I am trying to make a random image loader for a banner on a web page. I am using flash 5. I know how to write the script for a random loader in flash mx; however, the “switch” command will not copy over to flash 5. Help!!! I have no clue on how to accomplish this effect in flash 5.
pics=["pic1","pic2","pic3","pic4","pic5", "pic6"];
randpic = pics[random(pics.length)];
_root.container.loadMovie(randpic+".jpg");
that should work
where do i place the script? In the main time!! and do i have to put the pics in a folder call “container”. I have yet to get the script to work. more explaination is needed… thanks…
ok well
container = a blank movie clip used to hold our image, meaning a target for our image to load.
create a new symbol and give it an instance name container. then drag it onto your stage where you’d like your images to load.
in this case you would put your images in the same folder as your swf.
i can’t attach a FLA for you, you woun’t be able to open it up with flash 5.
thanks for your help. I have another problem also. i am trying to re-create this effect so i can learn flash… the website is www.dnastudio.com the banner interests me on this website. I create a MC using mask that tween the random image MC off of the screen… so step one is done… now i am having a hard time making it loop without it going to a white screen or loading a new image… i can not get a smooth transition from one image to the next… if u could help me that would be great… i am losing my mind… please help… and thanks again for your help…
ok your best bet is to post your fla, i really can’t tell you eactly what is wrong without seeing it. most likely you’ll just need to replay the movie.
Here you go, I would like it to loop infinitely… I have tried everything I can think of. I hope u can help. Thanks