actionscript 3 - AS3 gotoAndStop not working -
i'm having problem app. i've 3 frame in timeline, in 2nd frame i've mc own class: @ end of animation of mc call function main class. the code of mc class this
public function frame134() { stop(); var vmaintimeline: maintimeline = new maintimeline(); vmaintimeline.gotoframe3(); }
the function in main class this
public function gotoframe3() { trace("gotoframe3"); this.gotoandstop(3); trace("done"); }
the output in console gotoframe3 , done gotoandstop(3); doesn't work. suggestion or help? in advance
rather creating instance of maintimeline need reference using parent
property or referring stage
directly. replace frame134()
method below code.
public function frame134() { var stageref = this.parent; stageref.gotoandstop(3); }
or with
public function frame134() { stage.gotoandstop(3) }
hope work you.
Comments
Post a Comment