Hi,

I am creating a new basic page node content and set the text format to PHP.

How can I display a swf that resides in a separate folder ? eg: mysite.com/folderx/main.swf

Please can you give me a complete code sample ?

Thanks

Comments

kevin-bcr’s picture

Subscribe

james_drape’s picture

Subscribe

aniebel’s picture

I was successful with this:

<?php
  $swf = new SWFObject('sites/default/files/myswf.swf');
  $swf->param('allowFullScreen', 'true')
    ->param('type','movie')
    ->flashVar('maintainAspectRatio', 'true')
    ->flashVar('loop', 'true')
    ->flashVar('autoplay', 'true')
    ->height(700)
    ->width(800)
    ->minimumVersion('9.0.28');

   return theme('swfembed_embed', array('swf' => $swf));
?>

winklet’s picture

The above also works for me, except it cuts off any text that is on the page after that block of code. Any idea why this could be?