-
Random MovieClips
How can I make such a code, which shows a random movieclip in my movie?
-
Senior Member
do you have a bunch of clips to choose from or what?
-
I have a movie called main.swf
and in this move are 4 different images with animations (movieclips)
now i would like, that if ya enter the main.swf a random movieclip loads ?
-
-
Senior Member
code:
//put this on first frame of main.swf
myClips = new Array();
myClips[0] = "movieClip1.swf";
myClips[1] = "movieClip2.swf";
myClips[2] = "movieClip3.swf";
myClips[3] = "movieClip4.swf";
//lets say you have an emptyMC called "empty" that you want to load them into
//when the main.swf loads - put these actions on main.swf
onClipEvent(load){
_root.empty.loadMovie(myClips[random(3)]);
}
-
thx man - got it
-
but one thing - i would like to load MC's - they already exist in the main.swf ???!?!?!?!?!?!
-
Senior Member
in that case use linkage - open your library and right click on the mc's in question, then give it a linkage name.
-
hm.....can ya explain it more exactly
-
Originally posted by theScreen
hm.....can ya explain it more exactly
Goto library , then properties of the Movie clips you want to show.
Make sure the Export For ActionScript box is ticked , then decide on a name.
-
k thx - will try out later
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|