View Full Version : [F5] Arrrgh, need help
telegirl
September 1st, 2003, 09:04 PM
I've tried 3 different scripts for a random loading image layer and none of them work. Does anyone have code/script for this that will work for Flash 5? I'm totally hung up at this stage and can't move on with the page or site until I have this aspect resolved. I'd be really grateful if anyone can help..
jingman
September 1st, 2003, 10:14 PM
Could you post what you have so far?
What about it doesn't work, exactly?
telegirl
September 1st, 2003, 10:23 PM
This is what my code looks like so far...
choice = Math.round(Math.random()*3);
switch (choice) {
case 0 :
location.loadMovie("quote0.swf");
break;
case 1 :
location.loadMovie("quote1.swf");
break;
case 2 :
location.loadMovie("quote2.swf");
break;
}
Yeldarb
September 1st, 2003, 10:28 PM
_root.choice = random(3);
if(_root.choice == 0) {
_root.location.loadmovie("quote0.swf");
}
just do the if statement for each
should work... i just used a variation of that code for my footer yesterday to pick a random answer
Yeldarb
September 1st, 2003, 10:31 PM
oh, not sure if that will work in flash 5... i have mx...
telegirl
September 1st, 2003, 10:33 PM
I've been getting an error that the Javascript 'switch' construct isn't supported
Yeldarb
September 1st, 2003, 10:37 PM
with my code or yours?
telegirl
September 1st, 2003, 10:42 PM
with my code...I'm trying your code now
Yeldarb
September 1st, 2003, 10:43 PM
ok, post back with the results
telegirl
September 1st, 2003, 10:44 PM
well, the your code isn't creating any errors but it's not loading the images either
Yeldarb
September 1st, 2003, 10:48 PM
is quote0.swf in the same directory as the swf file that you produce?
telegirl
September 1st, 2003, 10:53 PM
It's in the same folder with the main swf file...I've been trying to get it to preview with no luck.
Yeldarb
September 1st, 2003, 10:54 PM
do you have aim?
if not, can you just upload the fla along with quote0, and i'll have a look
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.