Wrap the addEventListener call in a function that is triggered only after tlstFotos has been created.
thanks that was the problem,
i'm only working with it for 2 weeks now so excuse me for my stupid question :-)
No problem, I like the easy ones... :)
Hi, sorry if the question is kind of repetitive or even worse (Stupid), but I'm new working with AS3.. How do I "wrap" the addEventListener in a function so it can be triggered ONLY AFTER some MovieClip has been created?
I have a serious problem doing that.. I'm developing an educational app and the most of its elements (Buttons, MovieClips, etc.) are created dinamically, I mean in response to some action.. Plz if you can answer as soon as possible I have to finish my project at Monday..
Usually you add listeners right after instantiating the object.
Var b:Button = new Button();
Flex SDK Developer
Adobe Systems Inc.
Thanks Flex harUI. My problem goes beyond that, I have added events' listeners to objects before, that's not my problem. I think I worked it out the problem:
All I needed was access an objects' properties even if this object doesn't exist yet..
Well, I created an external class file and I defined my MovieClip as an Public and Dynamic class.. Eureka! It worked just fine.. Of course I'm having some problems to access other objects but I'm managing it..