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
}
}
}
HTH
Regards,
Keith Reinfeld
Home Page: http://keithreinfeld.home.comcast.net
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders