This content has been marked as final.
Show 3 replies
-
1. Re: basic play and clear movieclip actions AS2 / CS3
clbeech Mar 5, 2008 7:02 PM (in response to jameskachan)Hey James -
1) assuming that this code is attached to the clip who's timeline you wish to move to frame 6, yes this will work. However, it is a 'best practice to maintain all of your codes in one place on the timeline, because the code you indicate above is designed to be 'attached' to an Object. If this is not working, it is probably in the wrong place.
2) to activate a 'named function' or method that is defined at that point in the timeline, you simply need to make a call to the method, and it will fire when the playhead reaches that point, however since you are calling loadMovie, and loading another clip directly into the same holder, you shouldn't need to actually 'unload' the previous image, as it will be 'replaced' by the next image loading into the same clip.
-
2. Re: basic play and clear movieclip actions AS2 / CS3
jameskachan Mar 5, 2008 8:47 PM (in response to clbeech)Hello!
Thanks so much for responding.
It means a lot, I don't understand this stuff well, I'm a photographer mostly, not a coder.
anyway, so I tried what you suggested and it did not work.
The play head will now get past the stop(); at frame 5 and continue to frame 10, However all that happens now on click at frame 10 is the Movie clip replays itself (starting over and stopping at frame 5 again)
To explain better what I am doing.
The stage has thumbnail images, on clicking one an external swf is loaded via loadMovie into an empty mc holder on the stage, thus loading in this external swf "on top" of the stage, hiding the thumb gallery.
I want it so that upon clicking that loaded external movieclip, it will UNLOAD itself from the holder and therefore take the user back to the gallery of thumbnails.
The empty movie click identifier on the stage is called "imgholder_mc"
When a thumbnail is clicked, it loads "image1.swf" into the "imgholder_mc"
This problem relates to what is going on within "imgholder_mc"
basically I need some actionscript that will unload (and therefore clear) "imgholder_mc" once the playhead reaches frame 10.
I tried your previous code.. am I using it wrong? -
3. Re: basic play and clear movieclip actions AS2 / CS3
jameskachan Mar 5, 2008 9:14 PM (in response to jameskachan)Code:
on frame 10, actions layer, I have this code. (which doenst work of course)
I am needing this code to reference back to the parent movie so I am (trying) to use
"_level0" I'm not sure if that's what is wrong or what, all I know is that it doesn't work and all that happens on click is the MovieClip restarts.
stop();
var nextimage:String = "";
//
function getimage() {
imgholder_mc.loadMovie(nextimage);
}
//
clear_mc.onPress = function() {
_level0.imgholder_mc.unloadMovie();
};
buttonFour_mc.loadMovie("buttonFour.swf");
again.. any help would be AMAZING.
Thanks so much

