flash help please
- Started
- Last post
- 4 Responses
- drzoom
I am loading an ext. swf into the moviefield instance with
loadMovie("extmovie.swf", _root.moviefield);
there in the extmovie there is an moviclip instance called animation and I want the movie to unload when it reches a particular frame:
if (_root.moviefield.animation._cur... == 609) {
unloadMovie(_root.moviefield);
}It doesn't seem to be reading the currentframe though. Anyone know what I'm doing wrong?
- bry0
i had a problem like this before and i think that if your movieclip exists by way of actual keyframes instead of being spawned using actionscript, you can't remove it using unloadMovie. can anyone confirm this?
what you can do is one of two things:
1) on the last frame of "animation", go: this._visible = 0; (instead of checking the _currentframe with another clip)
2) well, i was gonna say to move the animation off the canvas or make it invisible, then use duplicateMovieClip to make the clip and then later unload the duplicate, but i think option 1 would be a lot easier and better anyway.
- stuff0
Call your frames via labels and not frame numbers. Flash has trouble recognising them sometimes.
Or you could tell your movie to go to a sub routine on the main timeline which removes your clip externally.
- frankbb0
i prefer to use the loadMovieNum that way its easier to unload it, just by calling the number and not the name.
If you are still having problems, just put unLoadMovieNum(1) on frame 609.
If it still won't unload get an empty flash file with stop on the first frame and get you script to load that movie in the same place and it will cause your previous movie to unload.
- ********0
label your root as something