Welcome!

And don't forget to edit your signature & profile.

 

Icon

Statistics

  • Total posts 23318
  • Total topics 4048
  • Total members 5574
  • Our newest member
    ALF5583

TOP POSTERS

Best way to embed Flash in a website.

Related to Adobe Flash and Shockwave.
   

Best way to embed Flash in a website.

Postby Kaypearl » Sun Apr 05, 2009 10:12 am

Would
Code: Select all
<object width="550" height="400">
<param name="movie" value="somefilename.swf">
<embed src="somefilename.swf" width="550" height="400">
</embed>
</object>


be OK?
Give me a tweet at: @Kaypearl

Once you go Mac, you never go back.

Respect & thanks.

P.S Blog coming soon!
User avatar
Kaypearl
Smashing <li>
 
Posts: 465
Joined: Tue Feb 24, 2009 11:02 am
Location: If it's important to you, you may ask me.
   

   
Most people use JavaScript to implement Flash nowadays, including big players like YouTube. This is additionally the only XHTML-valid way to do it.

Basically you have a regular <div> full of whatever content you please (ideally an SEO-friendly version of whatever's in the Flash), and then the JavaScript replaces that <div> with the Flash. Thus, search engines and those without JavaScript/Flash see the <div>; those with them enabled see the Flash.

The industry standard for this is SWFObject, which is used by the aforementioned big players such as YouTube. There's also a jQuery-specific plugin which uses some of jQuery's built-in functionality to condense the concept into less code.
Do you like Monkey Island? What about Day of the Tentacle, Full Throttle, Grim Fandango, or Psychonauts? These games all have one thing in common: Tim Schafer. To check out his latest game, head over to BRUTAL! The Legendary Fan Site.
User avatar
Ryan Williams
Smashing <div>
 
Posts: 222
Joined: Tue Feb 10, 2009 11:29 am
Location: Notts, UK
   

   

Re: Best way to embed Flash in a website.

Postby Kaypearl » Sun Apr 05, 2009 3:56 pm

Yea, I found that out through viewing the source for some Flash websites so I googled "swfobject.js".

Great plug-in! Thanks for the reply!
Give me a tweet at: @Kaypearl

Once you go Mac, you never go back.

Respect & thanks.

P.S Blog coming soon!
User avatar
Kaypearl
Smashing <li>
 
Posts: 465
Joined: Tue Feb 24, 2009 11:02 am
Location: If it's important to you, you may ask me.
   

   

Re: Best way to embed Flash in a website.

Postby josedaniel » Mon May 04, 2009 3:41 am

Kaypearl wrote:Yea, I found that out through viewing the source for some Flash websites so I googled "swfobject.js".

Great plug-in! Thanks for the reply!


I always use swfobject very powerful plugin.
User avatar
josedaniel
Smashing <span>
 
Posts: 83
Joined: Tue Mar 10, 2009 1:26 pm
Location: Costa Rica
   

   

Re: Best way to embed Flash in a website.

Postby Kaypearl » Mon May 04, 2009 6:35 am

Yep, that's what I use now, :).
Give me a tweet at: @Kaypearl

Once you go Mac, you never go back.

Respect & thanks.

P.S Blog coming soon!
User avatar
Kaypearl
Smashing <li>
 
Posts: 465
Joined: Tue Feb 24, 2009 11:02 am
Location: If it's important to you, you may ask me.
   


Return to Flash



Who is online

Users browsing this forum: No registered users and 1 guest