PDA

View Full Version : LoadMovie works in flash but not in browser


adamfilip
09-21-2006, 04:13 PM
I have a simple flash 8 file that loads in two other swf into it

movclip loaders are on seperate layers
only code in this file is

bodyloader_mc.loadMovie("promoflash.swf");
headerloader_mc.loadMovie("headernav.swf");

when i check it in flash it all works fine it loads up correctly
but when i put the flash loader swf. into a html file it doesnt load
the other two files inside

can someone help me

here is all the code for the html page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','750','heigh t','590','src','flash/loader','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/loader' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="750" height="590">
<param name="movie" value="flash/loader.swf" />
<param name="quality" value="high" />
<embed src="flash/loader.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="590"></embed>
</object></noscript>
</body>
</html>

kool-Aid
09-21-2006, 06:26 PM
Have you imported the movie clips into your flash document or are the being pulled from somewhere?

adamfilip
09-21-2006, 06:28 PM
they are being pulled from the same directory

kool-Aid
09-21-2006, 07:11 PM
Is that the html you get when you publish your fla? I usualy insert my swf's in fireworks or dreamweaver if they are going to serve as just banners on an html page. I can give you different ways to pull swf files into your flash presentation if that would help.

adamfilip
09-21-2006, 07:34 PM
that is the html generated by dreamweaver
when i told it to insert the flash media

neilmmm
09-21-2006, 07:52 PM
this happened to me once....

the fault was when i uploaded using dreamweaver ... somehow the file names had changed case...and were not being recognised ... i would check the file names

adamfilip
09-21-2006, 07:59 PM
but there is only one file name in dreamweaver
and the flash loads up fine except that flash doesnt look the other clips inside it
it just shows up with the background colour specified in the fla

darkzak
09-21-2006, 08:09 PM
The problem is that you have the .swfs in the flash directory and the html in the directory below the flash directory. Right?
When you load a swf into an html page the swfs directory becomes the directory of the html page. So you must load the swfs as if the loader.swf was in the html directory.

Change the code to point to the correct directory:

bodyloader_mc.loadMovie("flash/promoflash.swf");
headerloader_mc.loadMovie("flash/headernav.swf");

CyanBlue
09-21-2006, 08:37 PM
It sounds like a path problem to me...

If you have an index.html file in http://www.site.com/ which embeds http://www.site.com/flash/main.swf , the base directory of the main.swf will be http://www.site.com/ and it will load the http://www.site.com/child.swf file not http://www.site.com/flash/child.swf

To make it work right, you either have to place the child.swf into the directory where your index.html file located or hard code the 'flash' directory within the main.swf to load the flash/child.swf file...