LoadMovie Question
LoadMovie Question
Out of context: Reply #1
- Started
- Last post
- 6 Responses
- unfittoprint0
avoid using _root.
why?
because your 'child' movie's _root is now its 'parent's' _root.
#note1: don't target your _root to load a movie. use a blank target [createEmptyMovieClip] to become the holder. otherwise it will erase everything on stage. including your button.
#note2: don't write on(whatever) functions directly on buttons/mc's. that's deprecated. use an unique action layer to paste all your code.
/*example of an mc targeting its root [when placed directly on the stage]:*/
var target:MovieClip = this.createEmptyMovieClip("targe... this.getNextHighestDepth());
mc.onRelease = function() {
this._parent.target.loadMovi e("id.swf");
}