flash - Check component initilaze before add events in actionscript 3 -


How do I add components (move the clip or button) embedded from the add event First (release or click)) for this in the Actionsext 3?

Do I ask that you are trying to do this, in more general terms?

If you want to avoid only empty reference errors, then you are using the reference (variable) for null :

  if (_myComponent! = Null) {// add listeners}  

If for any other reason you should actually know that the component has been started before you do so , To send you some kind of event for this (Flex's UIComponents dispatch FlexEvent.INITIALIZE event, but I think that You are not using Flex) or alternatively an "initial", which I'm not sure is standard flash component (I'm looking for reference here.) You can definitely make a custom whatever The bclass of the component you are using for yourself, where you apply a initialized property, but I'm not sure how you can implement it for any standard Flash component. Sure on the thing What is the meaning of "initialization" in this context?


Comments