homepage Welcome to WebmasterWorld Guest from 54.166.122.86
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
Dreamweaver CS3 flash code
is this OK or should I stick with old version?
HelenDev

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3871319 posted 11:58 am on Mar 16, 2009 (gmt 0)

I have just upgraded to CS3 and it is telling me that the flash files I have embedded using DW MX 2004 are wrongly embedded and may not work in some versions of internet explorer.

Here is the code that CS3 says I should be using, but I notice that it does cause errors in IE6 & 7. It appears OK, but I get the 'done but with errors on the page' message showing in the status bar:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="200" height="200" id="FlashID" title="Classroom">
<param name="movie" value="images/movies/classroom1.swf">
<param name="quality" value="high">
<param name="wmode" value="opaque">
<param name="swfversion" value="9.0.45.0">
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don't want users to see the prompt. -->
<param name="expressinstall" value="../../Scripts/expressInstall.swf">
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="images/movies/classroom1.swf" width="200" height="200">
<!--<![endif]-->
<param name="quality" value="high">
<param name="wmode" value="opaque">
<param name="swfversion" value="9.0.45.0">
<param name="expressinstall" value="../../Scripts/expressInstall.swf">
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>

And this is the code I was using which I know doesn't validate, but doesn't give any errors in IE either:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="200">
<param name="movie" value="images/movies/classroom1.swf">
<param name="quality" value="high">
<embed src="images/movies/classroom1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="200"></embed>
</object>

Which is better to use?

 

bateman_ap

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3871319 posted 12:56 pm on Mar 16, 2009 (gmt 0)

I would look instead at SWFObject which you can now use through the Google API library:

[code.google.com...]

Seems to be much better embedding code IMO

HelenDev

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3871319 posted 3:07 pm on Mar 16, 2009 (gmt 0)

Thanks bateman. I'm not that au fait with Ajax, I probably need to go away and read up on it. How easy might this be to implement for someone like me? I don't use js much either, although I can usually find my way around it if necessary.

Does the Ajax method do all the version detection stuff that the CS3 code appears to do?

trick

5+ Year Member



 
Msg#: 3871319 posted 6:35 pm on Apr 3, 2009 (gmt 0)

it isn't AJax, just JS -- SWFobject does come with help files, it shouldn't be too hard to get started with it. And Adobe is going to start using it instead of their own method soon, if they haven't already with CS4.

the older method still works, but is clunky compared to newer methods. personally I haven't bothered replacing old code, but use the latest methods on new pages.

rocknbil

WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3871319 posted 2:10 am on Apr 4, 2009 (gmt 0)

How easy might this be to implement for someone like me?

Very easy. scroll to post # 6 [webmasterworld.com] for a working example, or post #2 [webmasterworld.com] for the same example, but how you add variables to pass to your Flash object.

This first time is scary, but after that you'll wonder why you never did it before. :-)

And additional grudge I've always had against the "publish" methods used by Flash is it never validates. Originally they nested <embed> inside <object>, which is invalid, now I'm seeing IE conditionals in their code, which is also invalid.

An additional piece of trivia for those that don't know, MS was pressed with a pending law suit by Macromedia at one point which prompted an update in Internet Exploder that would cause a "gray line" around Flash objects and the Flash wouldn't activate until you clicked it once. At the time, this was enough motivation to start using SWFObject to work around that issue. Once done, I realized it was just a better way to include Flash.

True, it's Javascript dependent, but if JS is disabled, it's likely Flash is too - but the beauty of it is the alternate content, which should be a static version of the Flash, displays first. "Graceful degradation" at it's finest. :-)

trick

5+ Year Member



 
Msg#: 3871319 posted 8:22 pm on Apr 4, 2009 (gmt 0)

macromedia didn't sue microsoft, that was some other company (Eolas). the click to activate thing is still in effect in plenty of browsers, which is why we have to (still) use JS to get around it.

google "microsoft embed lawsuit" if you want to learn more about the debacle.

rocknbil

WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3871319 posted 1:56 pm on Apr 5, 2009 (gmt 0)

Thank you for the correction, I was hoping someone would clear up the fuzzy details. :-)

HelenDev

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3871319 posted 9:11 am on Jun 16, 2009 (gmt 0)

This first time is scary, but after that you'll wonder why you never did it before. :-)

Yep, it took a few hours to get my head around it but I've now got SWFObject up and running and it's great.

I have also experimented with using SWFObject to pass variables into the flash movie to display dynamic text - very cool, and may be just what I need for an upcoming project :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved