• Can someone help me? I’m trying to embed an swf file on my custom template on my homepage. This is what I have added to my custom template php file.

    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','490','height','220','title','solutions','src','http://solutionsweneednow.com/wp-content/themes/cop15/solutions2/Main','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','http://solutionsweneednow.com/wp-content/themes/cop15/solutions2/Main' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="490" height="220" title="solutions">
       <param name="movie" value="http://solutionsweneednow.com/wp-content/themes/cop15/solutions2/Main.swf" />
       <param name="quality" value="high" />
       <embed src="http://solutionsweneednow.com/wp-content/themes/cop15/solutions2/Main.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="490" height="220"></embed>
     </object></noscript>

    and this above the </head> tag:
    <script src="http://solutionsweneednow.com/wp-content/themes/cop15/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

    I’m not really sure what I am doing wrong. I know my file works:
    http://solutionsweneednow.com/wp-content/themes/cop15/solutions2/Main.swf

    Thanks for your help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • SOLVED!!!

    I was struggling for hours to embed a swf. I didnt want to add it in a post/page through the admin interface, rather hard code it into one of the template files. (in my case index.php).

    You cannot place the swf or any of its attached files (e.g. xml, img data) in your theme’s directory. Place ALL flash content in the ROOT of your page, yes, among all the wp-whatever.php files. Then reference the swf’s location in whatever theme file you want (index.php, home.php, header.php) as <?php bloginfo(‘url’) ?>/yourmovie.swf.

    I really hopes this helps someone. I was loosing my mind!!

    Richard

    Hey,

    I have exactly the same problem, only taking it out of the theme directory doesn’t do the trick for me.

    The strange thing is that whenever I look at the source, all looks ok. Even when I copy the source output into a static page it works.

    http://2010.jurisverbeelding.nl/img_rotate/Image-rotator2.html

    But not in a template.

    http://2010.jurisverbeelding.nl/

    Does anyone have a clue??

    Sorry,

    Got it working as well! All the content needs to be in the absolute root, that includes js & xml files if needed.

    Yeah, anything the .swf uses must be in the root.

    Man, I’m surprised wordpress didn’t make that clearer. Lots of headaches.

    Thank you so much! This helped me a lot!

    Hey,

    I’ve taken all the steps listed in these posts to try to get this to work but it’s still not working. My .swf file and any external files pulled are in the root directory. I copied the necessary javascript and .swf embed code from the published flash files and put it in my page template .php file and changed the src location to the “<?php bloginfo(‘url’) ?>/yourmovie.swf”. Should I be pulling the javascript in from .js files in the root directory instead of internally? Any other suggestions?

    Thanks in advance!

    Nevermind, I fixed it. It turns out that the embed code for php is a little different than it is for html?

    http://www.walkernews.net/2009/07/18/how-to-embed-swf-in-html-code-or-wordpress-post/

    Thanks anyways!

    Placing all the files in the root worked for my homepage.

    But it doesn’t seem to do anything when I navigate to url/about-us.
    According to the designer there’s nothing funny about the XML file path in the Flash file.

    Has this happened to anyone else?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Embedding flash file on custom template’ is closed to new replies.