Passing a variable between frames with actionscript 3

后端 未结 4 539
甜味超标
甜味超标 2020-12-18 09:13

I am new to actionscript 3.0 and I\'m experiencing difficulty trying to pass a variable that is created and set in frame 1 to a dynamic text box that is added to the stage i

4条回答
  •  爱一瞬间的悲伤
    2020-12-18 09:33

    A simple fix would be creating global variable instead of local .

    var myVar = "hi" ;

    to

    this.myVar = "hi" ;

    If you decaled in Action Layer frame 1 , u can further access the this.myVar in other frames

提交回复
热议问题