Re: [Flashcoders] Not all MCs get onEnterFrame

2006-04-26 Thread Tyler Wright
you don't need that, it will be availible because its an anon function inside another function, therefore all variables inside the containing function will be availible. Right, because of this every MovieClip is sharing the same variables -- which is why it behaves unexpectedly. That worked

RE: [Flashcoders] Not all MCs get onEnterFrame

2006-04-24 Thread Mendelsohn, Michael
That worked perfectly. Thanks, Geoff. - MM you should set riseSpeed inside the newClip, and then apply the onenterframe to the clip's _y, like this: newClip.riseSpeed = ((0.03 * hitherYon) - 1.5); newClip.onEnterFrame = function():Void {

Re: [Flashcoders] Not all MCs get onEnterFrame

2006-04-24 Thread Johannes Nel
you don't need that, it will be availible because its an anon function inside another function, therefore all variables inside the containing function will be availible. put this in frame 1 of a movie to test function containing ():Void { var p:Number = 8; this.onEnterFrame = function ()

Re: [Flashcoders] Not all MCs get onEnterFrame

2006-04-24 Thread Johannes Nel
it looks like it should work, i would however refactor. in one place you use the return of attchMovie anotherplace you access the movie via root. have you go anything else in that movie you are attaching it to, maybe you are overriding a depth? try getNextHighestDepth instead of handing out depths