How can I embed a flash movie in a zend view programmatically?
I have tried to embed a flash movie in a zend view using the htmlFlash helper.
In theory you only have to pass the movie path to the htmlFlash helper in a phtml view:
echo $this->htmlFlash('/path/to/myMovie.swf');And the framework will generate the html code in the html page:
<object data="/path/to/flash.swf"
type="application/x-shockwave-flash"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
</object>
However, I have done so and the code doesn't appear on the source code.
Has anyone had this prob开发者_StackOverflow中文版lem?
Thank you
Try to set width
and height
:
<?php echo $this->htmlFlash(
$this->baseUrl('/gfx/flash.swf'),
array('width' => 700, 'height' => 200)
);
?>
Remember to check, if Adblock does not hide the actual element :)
90% chance you missed to ECHO the result. (= you wrote <?php $this->htmlFlash(...);?>
)
In the public folder where my .swf
files are located,
I had to add a .htaccess
file with this one line:
RewriteEngine On
精彩评论