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
yourself...

On 4/24/06, Mendelsohn, Michael <[EMAIL PROTECTED]> wrote:
>
> Hi list...
>
> I am creating a bunch of MCs on the stage that should each get an
> onEnterFrame function defined, but only the first one created in the
> loop is getting that function, and I don't see why.  Any ideas?
>
> Thanks,
> - Michael M.
>
>         private function mLanguages(attachToWhat):Void {
>                 attachToWhat.attachMovie("languages", "langTest", 10,
> {_x:50, _y:50});
>                 var totalFrames =
> _root.theContent.langTest._totalframes;
>                 _root.theContent.langTest.removeMovieClip();
>                 for (var i:Number = 1; i <= totalFrames; i++) {
>                         var hitherYon:Number = Math.round(Math.random()
> * (150 - 60) + 60);
>                         var riseSpeed:Number = ((0.03 * hitherYon) -
> 1.5);
>                         var newClip:MovieClip =
> _root.theContent.attachMovie("languages", String("lang" + i), (i + 5),
> {_x:50, _y:50});
>                         newClip.gotoAndStop(i);
>                         newClip.onEnterFrame = function():Void {
>                                 newClip._y -= riseSpeed;
>                         };
>                 }
>         }
>
> _______________________________________________
> [email protected]
> 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
>



--
j:pn
http://www.lennel.org
_______________________________________________
[email protected]
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

Reply via email to