PDA

View Full Version : Loading Random SWF file problems



cameron_
July 6th, 2005, 05:36 PM
filename = ["header1.swf", "header2.swf", "header3.swf", "header4.swf", "header5.swf"];
path = "www.domain.com/images (http://www.domain.com/images)";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget);

That is the code that I am using for the container swf. I know the code works because I used it for static images and it worked fine. When I take a look and the HTML file, this is the error I get.

" A script in this movie is causing Macromedia FLash Player 7 to run slowly. If it continues to run, your computer may become unresponsive."

each of the header swf files are about 40k, and they each load AS from a single AS file. Do I need a preloader? Does anyone have any ideas?

Lindquist
July 6th, 2005, 07:33 PM
Don't forget the forward slash "/" in your path after "images"

path = "www.domain.com/images/";

cameron_
July 6th, 2005, 07:50 PM
Don't forget the forward slash "/" in your path after "images"

path = "www.domain.com/images/";

Thats not the problem, but thanks for the reminder!

Lindquist
July 6th, 2005, 09:15 PM
I'm not getting any "unresponsive" errors when I test your code. Look for an open loop somewhere else in your code.

cameron_
July 7th, 2005, 09:42 AM
its odd becuase the swf files that are in the list work great by themselves,..

cameron_
July 12th, 2005, 09:47 AM
gotta bump it, im desperate!

Lindquist
July 12th, 2005, 11:38 AM
Can you post your .fla?

cameron_
July 12th, 2005, 01:02 PM
done!. It seems to load some swf files and not others? Is it loading only the first frame of the swf? Any help would be great.