per capire quando il nostro MovieClip è disegnato effettivamente sulla stage: As we have seen repeatedly, in the constructor of a class that extends MovieClip may be necessary to add the event ADDED_TO_STAGE to understand when our MovieClip is actually drawn on the stage:
1 2 3 4 |
It would be a good idea to delete this event within the function main() :
1 2 3 4 5 6 7 8 9 | / / Constructor MyClass ( ) : void { public function MyClass (): void { Event . ADDED_TO_STAGE , main ) ; addEventListener ( Event . ADDED_TO_STAGE, main); } / / main ( e : Event = null ) : void { private function main (e: Event = null): void { Event . ADDED_TO_STAGE , main ) ; removeEventListener ( Event . ADDED_TO_STAGE, main); / / ... } |










There are no comments for this post
Leave a comment