Hello,

I'm trying to get a simple .swf file working in page.tpl.php. When I open the .swf file location separately in the browser, it works perfect.

I also have swfObject2 correctly installed. (I don't even know if this is necessary)

The sfw function does load a flash object with the right parameters (size, wmode, or background color), but the flash frame remains empty.

This is what I have:

 <?php
print swf('http://example.com/header-temp/slidesimple.swf',
    array( 'params' => array(
                        'width' => '1000',
                        'height' => '281',
                        'wmode' => 'transparent',
            		),
    	)
);
?> 

The .swf file should call this .xml file.

<diaporama ordre="sequential" fadeTime="3" diapoInterval="6" fontSize="10" alignement="center" echelle="false" >
<image url="/header-temp/img/1.jpg"   />
<image url="/header-temp/img/2.jpg"   />
<image url="/header-temp/img/3.jpg"   />
<image url="/header-temp/img/5.jpg"   />
</diaporama>

All files are located like this:

http://example.com/header-temp/slidesimple.swf
http://example.com/header-temp/images.xml
http://example.com/header-temp/img/1.jpg
http://example.com/header-temp/img/2.jpg
http://example.com/header-temp/img/3.jpg
http://example.com/header-temp/img/5.jpg

All feedback is very welcome.
Cheers,
Danny

CommentFileSizeAuthor
#3 swf video code.txt1.51 KBiopsychguy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Danny_Joris’s picture

I just tried to use the swfObject2 's way of embedding swf files, but it has the same result: a blank flash frame.

    <script type="text/javascript">
       swfobject.embedSWF("http://example.com/header-temp/slidesimple.swf", "myContent", "1000", "281", "9.0.0");
    </script>

    <div id="myContent">
      <p>Alternative content</p>
    </div>

Still strange that putting http://example.com/header-temp/slidesimple.swf in the url, it works on it's own.

iopsychguy’s picture

This is the code I used to embed my .swf file. I made a temp .html file in Dreamweaver and just copied and pasted the code into drupal; worked for both the content and banner section. Like you, I cannot get swf tools to work properly. Hope this helps.

-Jason

Content on this page requires a newer version of Adobe Flash Player.

Only local images are allowed.

iopsychguy’s picture

FileSize
1.51 KB

I attached the code in a .txt file as I don't know how to properly post code :-(

Danny_Joris’s picture

In the meanwhile I found out that it expected my .xml file to be located in the /files folder, instead of the same folder where the .swf file is located.