jeudi 9 mars 2017

change dynamic text value in different frame Action Script 3

all. I have problem with dynamic text update value. when I set the value in frame 1, it's work fine, but problem came when I go to frame 2, the value didnt change. Please Help. Thanks

here's the code

package  {

import flash.display.MovieClip;


public class test extends MovieClip {


    public function test() {
        // constructor code
        if (this.currentFrame == 1){
            changeTitle("frame 1");
        }
        else if (this.currentFrame == 2){
            changeTitle("frame 2");
        }
    }
    public function changeTitle(newTitle:String){
        label_title.text = newTitle;
    }
}

}

Aucun commentaire:

Enregistrer un commentaire