PDA

View Full Version : load movie problem



g5604
November 28th, 2005, 07:59 AM
Hi,

i have a xml menu.. which works great until its loaded into another movie. the part that break is the scrolling of the menu. any ideas why. heres the code for the scrolling.

i have tried locking the root.


// easing display and playlist movement
MovieClip.prototype.easeY = function(t) {
this.onEnterFrame = function() {
this._y = int(t-(t-this._y)/1.5);
if (this._y>t-1 && this._y<t+1) {
delete this.onEnterFrame;
}
};
};

Barn
November 28th, 2005, 09:49 AM
I don't think that code is the part that's breaking it.

Look for the use of _root in the movie that you are loading into a target movieclip.

There is only one _root per level, so that, when you load a movie into a movieclip what that movie was seeing as the _root, when it was run by itself, has changed.

With Flash MX (maybe only 2004 on -- can't remember), the work-around was to use _lockroot (it's in the actionscript reference/help files), but the best solution is to not use absolute paths in the first place.