|
-
That pesky mc
I'm having a problem with my preloader, if anyone might be able to shed some light on my problem. Actually, the problem is with the "continue" button once the preloader has done it's thing.
The preloader is setup as an MC which is dragged to the first frame of the first scene and works perfectly. On the second frame, I've placed this code:
code: stop();
attachMovie( "Dancing Continue", "cont1", this._parent.getNextHighestDepth(), {_x:0, _y:0 } );
// the _x:0, _y:0 makes it off frame a little, but that'll be corrected
cont1.onRelease = function() {
stop();
trace( this ); // returns _level0.cont1
this._parent.play();
this.unloadMovie(); // causes the debugger to refresh
}
Once the preloader mc has finished, it issues a _parent.play() to get to the second frame shown above. Everything is working perfectly. The "Dancing Continue" mc is just a simple looping timeline, nothing fancy. When I click on the cont1 mc, the onRelease function fires like it should, and the scene progresses to the next frame which has simply this:
code: delete _parent.cont1;
// also tried
// delete cont1;
// delete _this._parent.cont1
// delete _root.cont1
However, throughout the rest of the movie, _level0.cont1 appears in the list of available variables... (Debug->List Variables)?
I'm using Flash MX 2004, and yup, I am just learning, so please, be kind
I can strip out the preloader and post it in Flash MX format if needed; I just figured that I'm overlooking the obvious and would be a quick fix for you gurus.
Thanks --
-
code: contl.removeMovieClip();
-
boy is my face red...
From MovieClip.unloadMovie() help:
Description
Method; removes the contents of a movie clip instance. The instance properties and clip handlers remain.
To remove the instance, including its properties and clip handlers, use MovieClip.removeMovieClip().
Guess it helps to read a little more, doesn't it? My C++ traits are showing through, expecting delete to clean up everything.
Thanks so much sergwiz!
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
|