Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,404 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,220 people online right now. Registration is fast and FREE... Join Now!




Embedding Flash in HTML

 
Reply to this topicStart new topic

Embedding Flash in HTML

pioSko
post 16 Feb, 2007 - 09:28 AM
Post #1


still.dreaming

Group Icon
Joined: 6 Jun, 2003
Posts: 1,888



Thanked 3 times

Dream Kudos: 225
My Contributions


I've had a number of people ask me the same question and I thought I might share this with everybody. It concerns embeding Flash SWF files in your HTML documents.

There are a number of ways you can do this and most people are used to doing it the Macromedia Adobe way. However, this is not the best way to do it and it is not a standard approved by the W3C (http;//www.w3.org) which states that <EMBED> is bad... mmmmmk.

There exists a very nice method created by Geoff Stearns which enables users to embed SWF files in HTML called SWFObject.

As it says on their page:

QUOTE
The script can detect the Flash plug-in in all major web browsers (on Mac and PC) and is designed to make embedding Flash movies as easy as possible. It is also very search engine friendly, degrades gracefully, can be used in valid HTML and XHTML 1.0 documents*, and is forward compatible, so it should work for years to come.

SWFObject is very easy to use and gives you some options like easily sending variables to your flash movies, creating full window sites and has Flash detection... and is W3C friendly.

Share your experiences or post problems here.
User is offlineProfile CardPM

Go to the top of the page

theRemix
post 16 Feb, 2007 - 11:22 AM
Post #2


D.I.C Regular

***
Joined: 19 Oct, 2005
Posts: 368



Thanked 1 times
My Contributions


QUOTE(pioSko @ 16 Feb, 2007 - 10:28 AM) *

I've had a number of people ask me the same question and I thought I might share this with everybody. It concerns embeding Flash SWF files in your HTML documents.

There are a number of ways you can do this and most people are used to doing it the Macromedia Adobe way. However, this is not the best way to do it and it is not a standard approved by the W3C (http;//www.w3.org) which states that <EMBED> is bad... mmmmmk.

There exists a very nice method created by Geoff Stearns which enables users to embed SWF files in HTML called SWFObject.

As it says on their page:

QUOTE
The script can detect the Flash plug-in in all major web browsers (on Mac and PC) and is designed to make embedding Flash movies as easy as possible. It is also very search engine friendly, degrades gracefully, can be used in valid HTML and XHTML 1.0 documents*, and is forward compatible, so it should work for years to come.

SWFObject is very easy to use and gives you some options like easily sending variables to your flash movies, creating full window sites and has Flash detection... and is W3C friendly.

Share your experiences or post problems here.



thanks... good info, but i use UFO
User is offlineProfile CardPM

Go to the top of the page

pioSko
post 16 Feb, 2007 - 01:54 PM
Post #3


still.dreaming

Group Icon
Joined: 6 Jun, 2003
Posts: 1,888



Thanked 3 times

Dream Kudos: 225
My Contributions


Yep, also a good one, remix smile.gif
User is offlineProfile CardPM

Go to the top of the page

eddieboy665
post 12 Apr, 2007 - 02:11 PM
Post #4


D.I.C Head

**
Joined: 9 Apr, 2007
Posts: 71



Thanked 1 times
My Contributions


Hi,


Just messing about with it, and struggling. I have embedded one flash object fine on this page:
www.things4free.info/index2.php
The embedded flash using this method is the left images bar, now when I try an embed another in my intro page:
www.things4free.info/php/intro.php which appears on load as the title page, using AJAX, it only displays the text as if no plugin exists. I'm confused and would appreciate a speedy reply cos I'd sleep better then!

Cheers,
Ed
User is offlineProfile CardPM

Go to the top of the page

eddieboy665
post 13 Apr, 2007 - 09:54 AM
Post #5


D.I.C Head

**
Joined: 9 Apr, 2007
Posts: 71



Thanked 1 times
My Contributions


Hi,

I still cant get it, dunno if anyone knows how to fix it?

My site uses AJAX, the XML object is created and then goes to my PHP 'PageSwitcher' which using the GET method determines which file to include. This then updates the div; 'ContentL'. If that helps explain the problem.

My 'intro' page is the page that is included if no argument is supplied.

I'm guessing the problem embedding the flash in the 'intro' page comes from the use of the include in PHP but not positive.

Thanks in advance,
Ed
User is offlineProfile CardPM

Go to the top of the page

bmcc81
post 18 Jul, 2007 - 08:19 AM
Post #6


D.I.C Head

**
Joined: 10 Jul, 2007
Posts: 164


My Contributions


QUOTE(eddieboy665 @ 13 Apr, 2007 - 10:54 AM) *

Hi,

I still cant get it, dunno if anyone knows how to fix it?

My site uses AJAX, the XML object is created and then goes to my PHP 'PageSwitcher' which using the GET method determines which file to include. This then updates the div; 'ContentL'. If that helps explain the problem.

My 'intro' page is the page that is included if no argument is supplied.

I'm guessing the problem embedding the flash in the 'intro' page comes from the use of the include in PHP but not positive.

Thanks in advance,
Ed


Hey Dude,

Try and use this emebed flash with javascript. It works great on my site. All you have to do is add the javascript code in the html and have a linked document thats a javascript doc.

You can get the instructions here:
http://www.bobbyvandersluis.com/ufo/

I also attache zipped file

Enjoy,
bmcc81


Attached File(s)
Attached File  ufo.zip ( 23.42k ) Number of downloads: 149
User is offlineProfile CardPM

Go to the top of the page

bmcc81
post 31 Jul, 2007 - 05:22 AM
Post #7


D.I.C Head

**
Joined: 10 Jul, 2007
Posts: 164


My Contributions


I'm back,

I was using the UFO embed, but I found out that when using a flash file that use's xml that it doesn't send out properly and nothing from the xml shows up. Does anyone know how to fix this?

I also tried using the swfObject and I can't seem to get the thing working.

The top part is UFO and the bottom part is swfObject. Top one is fine bottom I can't get her to work.

N e ideas

www.elviscollectibletins.com\karaokeJustTopEmbed.html


Anyone have any
User is offlineProfile CardPM

Go to the top of the page

bluetoot
post 17 Nov, 2007 - 06:03 AM
Post #8


New D.I.C Head

*
Joined: 17 Nov, 2007
Posts: 1


My Contributions



hello please i need help here,i have this html that has the below code embbeded in it. please how can i convert this to a swf file.....thanks



<OBJECT codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
height="305" width="379" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>
<PARAM NAME="_cx" VALUE="10028">
<PARAM NAME="_cy" VALUE="8070">
<PARAM NAME="FlashVars" VALUE="">
<PARAM NAME="Movie" VALUE="images/Wc7a295e9bd45c.htm">
<PARAM NAME="Src" VALUE="images/Wc7a295e9bd45c.htm">
<PARAM NAME="WMode" VALUE="Window">
<PARAM NAME="Play" VALUE="-1">
<PARAM NAME="Loop" VALUE="-1">
<PARAM NAME="Quality" VALUE="High">
<PARAM NAME="SAlign" VALUE="">
<PARAM NAME="Menu" VALUE="-1">
<PARAM NAME="Base" VALUE="">
<PARAM NAME="AllowScriptAccess" VALUE="always">
<PARAM NAME="Scale" VALUE="ShowAll">
<PARAM NAME="DeviceFont" VALUE="0">
<PARAM NAME="EmbedMovie" VALUE="0">
<PARAM NAME="BGColor" VALUE="">
<PARAM NAME="SWRemote" VALUE="">
<PARAM NAME="MovieData" VALUE="">
<PARAM NAME="SeamlessTabbing" VALUE="1">
<embed src="images/Wc7a295e9bd45c.htm" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="379" height="305"> </embed>
</OBJECT>
User is offlineProfile CardPM

Go to the top of the page

mb4499
post 28 Nov, 2007 - 08:20 AM
Post #9


New D.I.C Head

*
Joined: 28 Nov, 2007
Posts: 4


My Contributions


Is there a way to embed a flash video/component that continues playing, without reloading, each time a visitor clicks through different HTML pages within the site?

Or, put another way, if I want distinct HTML pages for my site, for SEO purposes, can I not have a continuous section of flash that doesn't change or reload each time a new HTML page (within my site) is requested/selected by a user?
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 08:15AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month