This content has been marked as final. Show 3 replies
your variable "it" is incremented in frame 2 (and not a random number). if frame 2 repeatedly executes you're going to load images in incremental order.
and why are you using attachMovie() and then using those attached movieclips as targets of your loadMovie()?
Thanks a lot for the prompt response!
Oh, I see what I've done with the incrementing thing... what should I replace that with? I've tried using the same randomising script from frame 1, but that leads to some errors (I assume that's because the number that's generated sometimes exceeds the number of images?)
"and why are you using attachMovie() and then using those attached movieclips as targets of your loadMovie()?"
To be honest I've been working with Actionscript only for a very short while, so I simply experimented with the few functions that I know until it worked out. But now that I'm not happy with the functionality, I don't really know how to go about it. Would you possibly be able to help me out, because you seem to understand my problem, and what I'm aiming for.
movieclips that are the target of a loadMovie() statement are replaced by the loading jpg. there's no reason to use a movieclip from your library as the target. you could use createEmptyMovieClip() to create a target movieclip and removeMovieClip() to remove a loaded jpg when it's no longer needed.
in addition, anytime you want to generate a random integer bettween 1 and 86, you can use: