On Wed, Feb 24, 2010 at 11:01 AM, Keith Reinfeld
<[email protected]>wrote:

> Your code references the stage (to position your textfield) so you need to
> listen for the ADDED_TO_STAGE event to prevent the null reference.
>
> Example:
>
> package{
>        import flash.events.Event;
>         import flash.display.MovieClip;
>         public class Preloader extends MovieClip{
>                 public function Preloader(){
>                        addEventListener(Event.ADDED_TO_STAGE, init, false,
> 0, true);
>                }
>                private function init(e:Event){
>                        removeEventListener(Event.ADDED_TO_STAGE, init);
>                        // do stuff
>                }
>        }
> }
>

I tried that but it didn't help.
TIA,
V
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to