Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-10-2009, 04:23 PM   PM User | #1
snarf1974
New Coder

 
Join Date: Aug 2008
Location: Liverpool
Posts: 53
Thanks: 37
Thanked 0 Times in 0 Posts
snarf1974 is an unknown quantity at this point
Question Swfobject not showing flash movie!!!

Hi,

I'm trying to get swfobject to work, but for some reason it's not showing the swf movie.

This is the code in the body:

Code:
<script type="text/javascript" src="js/swfobject.js"></script>

<div id="flashcontent">
  This text is replaced by the Flash movie.
</div>

<script type="text/javascript">
   var so = new SWFObject("slideshow1.swf", "654", "250", "9", "#fff");
   so.write("flashcontent");
</script>

I downloaded the latest version of swfobject 2.1, and uploaded it to the js folder. In Flash CS3, I just use the flash format, and publish it.

I have noticed that there should be an id after "slideshow1"...

Code:
var so = new SWFObject("slideshow1.swf", "654", "250", "9", "#fff");

... but when I dragged slideshow1.swf into code view in dreamweaver, there doesn't seem to be an id:

Code:
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','654','height','250','src','slideshow1','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','slideshow1' ); //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="654" height="250">
  <param name="movie" value="slideshow1.swf" />
  <param name="quality" value="high" />
  <embed src="slideshow1.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="654" height="250"></embed>
</object></noscript>
So, at the moment it's displaying the replacement text, but not the swf movie. What am I doing wrong here? Any help would be appreciated.

Many Thanks
snarf1974 is offline   Reply With Quote
Old 01-10-2009, 04:35 PM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Are you using the old code with new sfwobject.js file?
Check the manual of new version, http://code.google.com/p/swfobject/wiki/documentation
(scroll down to see the dynamic method)
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Users who have thanked abduraooft for this post:
snarf1974 (01-11-2009)
Old 01-10-2009, 07:37 PM   PM User | #3
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
Get rid of the AC code! You are using Dreamweaver, and you need to remove anything that Dreamweaver would have inserted into the document before adding the SWFObject code.
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote
Users who have thanked gnomeontherun for this post:
snarf1974 (01-11-2009)
Old 01-11-2009, 12:33 PM   PM User | #4
snarf1974
New Coder

 
Join Date: Aug 2008
Location: Liverpool
Posts: 53
Thanks: 37
Thanked 0 Times in 0 Posts
snarf1974 is an unknown quantity at this point
Thanks very much, checked the manual of the new version, and now it's working fine.
snarf1974 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:33 PM.


Advertisement
Log in to turn off these ads.