When 'this.link' loads into imagem_mc, any existing properties and methods of imagem_mc are destroyed because 'this.link' replaces imagem_mc.
Immediately after loading the MovieClip, you call subAppear which assigns the onEnterFrame handler. This handler is destroyed when the MovieClip loads so you don't see your animation working. Here are your options: 1) use MovieClipLoader and then use the onLoadInit event to evoke subAppear when the movie has completely loaded or 2) nest imagem_mc inside a wrapper MovieClip and assign the onEnterFrame handler to that wrapper. The first option is the better option as it's just neater and also because I think it's fair to assume you only want the animation to happen once the MovieCLip has loaded anyway. HTH Adrian On 7/20/06, Jose Maria Barros <[EMAIL PROTECTED]> wrote:
Hello. Im doing a test loading from xml information to load into one movie clip one photo and having a number menu. When i press one of those numbers a function subAppear makes the movieclip slide from the top. Wht i dont understand is that he loads the photo, but the function doesnt work..i tried to test the function without loading the xml and the function works good..but when i load the xml..it doesnt..any help? Thanks in advance...and here is the code from the function and the function that creates the buttons Jose Maria function subAppear(mc:MovieClip, val:Number, target:Number):Void { mc.onEnterFrame = function() { if (target-this._y<0.2 && this._alpha>99) { this._y = target; delete this.onEnterFrame; } if (this._alpha<101) { this._alpha += val; } if (this._y<target) { this._y -= (this._y-target)/4; } }; } function createPhotofolio():Void { for (i=0; i<photoMenu.length; i++) { newBut = _root.attachMovie("but", "but"+i, 9999999+i); newBut._x = 33+(newBut._width+5)*i; newBut._y = 380; newBut.txt.text = [i+1]; newBut.link = photoMenu[i].firstChild.firstChild; newBut.onRelease = function() { loadMovie(this.link, imagem_mc); subAppear(imagem_mc, (i+3), 95); }; } } _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com