-
loading individual movieclips
Is it possible to have two movie clips but load them individually? If so, How?
halfeaten
-
are you trying to do something where you click on a button and it causes a movie clip to load?
if so, yes... you can either do attachMovie, if your symbol is in the library of this movie (.fla) or loadMovie, if you're trying to load an external movie (.swf).
so, a sample might be:
thisButton.onEnterFrame = function(){
this.onPress = function(){
_root.createEmptyMovieClip("nuMovie",1);
_root.nuMovie.attachMovie("ball","ball_mc",2);
_root.nuMovie._x = 0;
_root.nuMovie._y = 0;
}
}
where you have a symbol on the stage whose instance name = thisButton. this code would have been written on an actions layer. so, this AS is saying, "when the movie is loaded, watch for the following actions that may be applied to thisButton."
if the user presses on thisButton, an empty movie clip will be created and the symbol that has a linkName = ball will be added to the stage. this will then be given an instance name of ball_mc, and set to depth = 2. the last two root lines set the coordinates for ball_mc, in the case, the upper left hand corner of the stage.
hope this helps. good luck.
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
|