how do I make non-document-class classes 'aware' of stage components in Flash AS3?

后端 未结 5 526
余生分开走
余生分开走 2021-01-28 05:56

I am working on a text adventure game which will have at least a few components (a text area for narrative and text input for user input) on the stage at all times. Therefore, I

5条回答
  •  后悔当初
    2021-01-28 06:39

    The fact that they will be on stage at all times shouldn't stop you from creating specific classes for them.

    Depending on your game structure, you could either create a MovieClip with your TextFields and link them to the Typewriter class, or simply create a class for the TextFields and use Events to modify the text content.

    You're using external classes so there are no reason to keep any kind of logic inside Flash CS.

提交回复
热议问题