[FONT=Times New Roman][SIZE=3]Hello,[/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman] I am trying to load an image at random in Flash. I have the image moving across the stage when the user first comes to the site. I have a pre-loader on the movie, but after the movie loads it goes to scene 2 and the random image still has to load. Is there away to load the image in scene 1 where the pre-loader is? Here is my random image script that I have in scene 2 where the image is.[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]MovieClip.prototype.setRand = function() {[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] largest= 10;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] lowest = 1;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] rand = ((Math.floor(Math.random()100)%(largest-lowest+1))+lowest);[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] loadMovie(“indexpic/”+rand+".jpg", “empty”);[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]}[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]setRand();[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]here is my pre-loader script in scene 1[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]bytes_loaded = Math.round(_root.getBytesLoaded());[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]bytes_total = Math.round(_root.getBytesTotal());[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]getPercent = bytes_loaded/bytes_total;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]_root.loadBar._width = getPercent100;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]_root.loadText = Math.round(getPercent*100)+"%";[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]if (bytes_loaded == bytes_total) {[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] gotoAndPlay(“Scene 2”, 1);[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3]}[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Thanks,[/SIZE][/FONT]