Swf embed shortcut function

<?php

//Here is a link to all params: http://kb2.adobe.com/cps/127/tn_12701.html
function dev_embed_swf($args = '') {
$defaults = array(
'url' => 'not set',
'width' => '550',
'height' => '440',
'wmode' => 'opaque',
'bgcolor' => '#000000',
'play' => 'true',
'loop' => 'false'
);
$r = wp_parse_args($args,$defaults);
extract($r);
?>
<div id="<?php echo str_replace('.','_',basename($url)) ?>" class="dev_embed_swf">
<object type="application/x-shockwave-flash" data="<?php echo $url ?>" width="<?php echo $width ?>" height="<?php echo $height ?>">
<param name="quality" value="high" />
<param name="wmode" value="<?php echo $wmode ?>" />
<param name="bgcolor" value="<?php echo $bgcolor ?>" />
<param name="play" value="<?php echo $play ?>" />
<param name="loop" value="<?php echo $loop ?>" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="/Scripts/expressInstall.swf" />
<param name="movie" value="<?php echo $url ?>" />
</object>
</div>
<?php
}
?>

0 Comments

You must be logged in to post a comment.