Flash Plug-in does not validate XHTML
Posted: 11 March 2006 04:36 PM   [ Ignore ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1429
Joined  08-28-2003

How do you get the EE Flash plugin to output validated XHTML 1.0 Transitional code?

Here’s what’s embedded into the Template in EE:

{exp:flashplugin file=“http://www.mysite.com/images/header_home_flash_10-05.swf” width=“730” height=“273”}


I’ve also tried it manually, but no go on validation:

<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=“730” height=“273”>
        <param name=“movie” value=“http://www.mysite.com/images/header_home_flash_10-05.swf”>
        <param name=“quality” value=“high”>
        <embed src=“http://www.mysite.com/images/header_home_flash_10-05.swf” quality=“high” pluginspage=“http://www.macromedia.com/go/getflashplayer” type=“application/x-shockwave-flash” width=“730” height=“273”></embed></object>

How do we embed a Flash image and still get XHTML validation?

 Signature 

RonnieMc

Honolulu, HI USA

HomeMac360

Profile
 
 
Posted: 11 March 2006 05:27 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15743
Joined  06-03-2002

I love Chicken Satay almost as much as ALA’s Flash Satay.

 Signature 
Profile
MSG
 
 
Posted: 11 March 2006 06:30 PM   [ Ignore ]   [ # 2 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1429
Joined  08-28-2003

What’s interesting about the ALA code is it does NOT validate when dropped into a valid XHTML page.

ALA Code (straight from their page):

<object
classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”
codebase=“http://download.macromedia.com
/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0”
width=“400” height=“300” id=“movie” align=”“>
<param name=“movie” value=“movie.swf”>
<embed src=“movie.swf” quality=“high” width=“400”
height=“300” name=“movie” align=””
type=“application/x-shockwave-flash”
plug inspage=“http://www.macromedia.com/go/getflashplayer”>
</object>

However, this works, and validates:

<object type=“application/x-shockwave-flash” data=“http://www.mysite.com/images/header_home_flash_10-05.swf” width=“730” height=“273”>
<param name=“movie” value=“http://www.mysite.com/images/header_home_flash_10-05.swf” />
http://www.mysite.com/images/header_home_flash_10-05.swf</object>

Go figure.

Neither of the code samples above will display the Flash image in Firefox Mac 1.5.0.1., though OK in Safari and Camino. Yet, the same Firefox displays other Flash.

Go figure.

 Signature 

RonnieMc

Honolulu, HI USA

HomeMac360

Profile
 
 
Posted: 11 March 2006 07:03 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15743
Joined  06-03-2002

Um..did you read the full article, Ronnie?  That top code block that you quoted is the example of how not to do it.  Keep reading for how to get rid of the <embed> tag (which is not part of the HTML spec), and make it cross-browser compatible.

Also, some quick Googling revealed some other viable methods that have been published since ALA’s article.

http://blog.deconcept.com/2005/03/31/proper-flash-embedding-flashobject-best-practices/
http://www.allinthehead.com/retro/234/
http://www.ambience.sk/flash-valid.htm

 Signature 
Profile
MSG
 
 
Posted: 11 March 2006 07:14 PM   [ Ignore ]   [ # 4 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1429
Joined  08-28-2003

Hahahaha. Of course not. I just read until there was code to copy.

grin

Thanks. I went back and found the good pieces, which matched what I’d found elsewhere.

See what I get for working on Saturday?

Still haven’t figured out the Firefox problem.

 Signature 

RonnieMc

Honolulu, HI USA

HomeMac360

Profile
 
 
Posted: 12 March 2006 02:20 AM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  194
Joined  09-14-2004

I use the wonderful FlashObject technique. Better than the Flash Satay method, imo. And yes, it validates.

 Signature 

{ say it once, say it twice, lealea says it’s nice }
{ member, professionals network }

Profile
 
 
Posted: 12 March 2006 09:40 AM   [ Ignore ]   [ # 6 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1429
Joined  08-28-2003

Whew. What a mess. No wonder I find myself trying to avoid Flash wherever possible. IMO, it’s much ado over much of a mess.

Unfortunately, some clients spent big bucks on Flash elements and want to retain the investment when making a switch to an EE site.

 Signature 

RonnieMc

Honolulu, HI USA

HomeMac360

Profile
 
 
Posted: 02 September 2006 12:47 AM   [ Ignore ]   [ # 7 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  263
Joined  01-03-2004

I want to use FlashObjects script so my pages with the FLV Player can validate XHTML.  I’m just not sure how to add it to the “pi.flvplugin.php”. 

Here is the code I think it needs to fit into:

$flv = "<!-- FLV START -->\n";
            
$flv .= "<object type='application/x-shockwave-flash'\n";
            
$flv .= "width='".$width."' height='".$height."' wmode='transparent' data='".$playerpath."flvplayer.swf?file=".$href."&autoStart=".$autostart."'>\n";
            
$flv .= "<param name='movie' value='".$playerpath."flvplayer.swf?file=".$href."&autoStart=".$autostart."'>\n";
            
$flv .= "<param name='wmode' value='transparent' />\n";
            
$flv .= "</object>\n";
            
$flv .= "<!-- FLV END -->";

I did add the

</script>

within the head. 

Someone tried this and can help me out?

Thanks, Pat smile

Profile
 
 
Posted: 02 September 2006 04:05 AM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  756
Joined  03-22-2004

You know the SWFObject is so simple there is no need for a plugin.
Just found out there is a new version of the player available also with some extra features so will work on a new plugin.

To use the SWFObject add the Javascript to your head as explained and then add this to your template (using your custom field {flvideo})

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

<
script type="text/javascript">
   var
so = new SWFObject("http://www.yoursite.com/system/plugins/flvplayer.swf?file={flvideo}&autoStart=true", "mymovie", "320", "240", "7", "#336699");
   
so.write("flashcontent");
   
so.addParam("wmode", "transparent");
</script>

Profile
 
 
Posted: 02 September 2006 08:44 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  263
Joined  01-03-2004

Do you mean that I don’t need to do anything in the plugin file - pi.flvplugin.php?

But I put the code above just in my index.php template?

Thanks, Pat smile

Profile
 
 
Posted: 02 September 2006 08:48 AM   [ Ignore ]   [ # 10 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  756
Joined  03-22-2004
patdpoo - 02 September 2006 08:44 AM

But I put the code above just in my index.php template?

yes that if correct and wrap it in the {if} statement as before

Profile
 
 
Posted: 02 September 2006 08:50 AM   [ Ignore ]   [ # 11 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  756
Joined  03-22-2004

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


leave that code as it is and delete the old flv plugin code

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64534 Total Logged-in Users: 28
Total Topics: 81113 Total Anonymous Users: 19
Total Replies: 436429 Total Guests: 199
Total Posts: 517542    
Members ( View Memberlist )
Newest Members:  bluespotmusicvolandspinhirnetheminiokostiamasterjeMBossbchaleyalvonsiuscwestfall