I tried to embed a Fash movie inside embed quotes in html and it doesnt work

I tried to embed a flash movie in an html and it doesn't work.

<embed src="http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="428" height="441"></embed>

but when i directly call the url, it works :
http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf

Could please explain we what's wrong with my code

Saranga Amarasinghe
Analyst/Programmer

delay = 3000; 
//----------------------- 
function loadXML(loaded) 
{ 
	if (loaded) 
	{ 
		xmlNode = this.firstChild; 
		image = []; 
		description = []; 
		total = xmlNode.childNodes.length; 
		for (i=0; i<total; i++) 
		{ 
			image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue; 
			description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue; 
		} 
		firstImage(); 
		} 
		else 
		{ 
			content = "file not loaded!"; 
		} 
	} 
	xmlData = new XML(); 
	xmlData.ignoreWhite = true; 
	xmlData.onLoad = loadXML; 
	xmlData.load("images.xml"); 
	///////////////////////////////////// 
	listen = new Object(); 
	listen.onKeyDown = function() 
	{ 
		if (Key.getCode() == Key.LEFT) { 
		prevImage(); 
	} 
	else if (Key.getCode() == Key.RIGHT) 
	{ 
		nextImage(); 
	} 
}; 
p = 0; 
this.onEnterFrame = function() 
{ 
	filesize = picture.getBytesTotal(); 
	loaded = picture.getBytesLoaded(); 
	preloader._visible = true; 
	if (loaded != filesize) 
	{ 
		preloader.preload_bar._xscale = 100*loaded/filesize; 
	} 
	else 
	{ 
		preloader._visible = false; 
		if (picture._alpha<100) 
		{ 
			picture._alpha += 10; 
		} 
	} 
}; 
function nextImage() { 
if (p<(total-1)) { 
p++; 
if (loaded == filesize) { 
picture._alpha = 0; 
picture.loadMovie(image[p], 1); 
desc_txt.text = description[p]; 
picture_num(); 
slideshow(); 
} 
} 
} 
function prevImage() { 
if (p>0) { 
p--; 
picture._alpha = 0; 
picture.loadMovie(image[p], 1); 
desc_txt.text = description[p]; 
picture_num(); 
} 
} 
function firstImage() { 
if (loaded == filesize) { 
picture._alpha = 0; 
picture.loadMovie(image[0], 1); 
desc_txt.text = description[0]; 
picture_num(); 
slideshow(); 
} 
} 
function picture_num() { 
current_pos = p+1; 
pos_txt.text = current_pos+" / "+total; 
} 
function slideshow() { 
myInterval = setInterval(pause_slideshow, delay); 
function pause_slideshow() { 
clearInterval(myInterval); 
if (p == (total-1)) { 
p = 0; 
firstImage(); 
} else { 
nextImage(); 
} 
} 
}

Open in new window

LVL 2
szarangerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZefferCommented:
a swf is an object so the browser needs object tags
<object>
<embed src="http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="428" height="441"></embed>
</object>

Z
0
ZefferCommented:
sorry mixing up there..
the code you have with the embed tags is for firefox and some other browsers.
for it to work in IE you need the object tags..
<object>
<param name=movie value="http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="428" height="441">
    <param name=movie value="portfolio.swf">
    <param name=quality value=high>
<embed src="http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="428" height="441"></embed>
</object>

should run both

Z


0
ZefferCommented:
and thats not right either..param name is a line of my code :(

<object>
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="428" height="441">
   <param name=movie value="http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf">
    <param name=quality value=high>
<embed src="http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="428" height="441"></embed>
</object>

still it's nice to get lots of mail :)
Z
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

szarangerAuthor Commented:
Hi Zeffer,
Thanks for your comments, I'll try this out overnight and get back to you  :-)
0
szarangerAuthor Commented:
Hi Zeffer,

I tried the code you've given yesterday . But it still does not work. Here is the URL:
http://www.physiquefitness.com.au/gallery.html

But if I call the src it works:
http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf
0
ZefferCommented:
Ok..try using the javascript object code generated by the browser when you link directly..
it goes here..

<h1>Gallery</h1>
<script src="res://xpsp3res.dll/objectembed.js"></script> <script language="javascript">var objectSource="http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf"; </script>
                            <embed src="http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="428" height="441"></embed>

Z
0
ZefferCommented:
you will need to add height and width also

<script src="res://xpsp3res.dll/objectembed.js"></script> <script language="javascript">var objectSource="http://www.physiquefitness.com.au/FlashFiles/xml_pg_final_mx.swf" width="428" height="441"; </script>
0
szarangerAuthor Commented:
I try this code tonight and get back to you. Thank Zeffer.
0
szarangerAuthor Commented:
It doesn't work either :-(
0
ZefferCommented:
just went to ..
http://www.physiquefitness.com.au/gallery.html
and it's working fine!?

Z
0
szarangerAuthor Commented:
Finally Yesterday night, I found what was wrong:  I have placed the XML file in the same folder where the images are. I replaced the XML file to the same directory as the HTML and it works. A silly mistake I couldn't find out:-( Thanks for the support though
0
ZefferCommented:
no problem..it's often little things like that.
Z
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.