Reputation: 1772
I can't seem to figure out how to change the timeline's frame from inside a custom class.
package {
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.display.*;
import flash.events.Event;
import flash.text.TextField;
import flash.external.ExternalInterface;
import flash.net.navigateToURL;
import flash.external.ExternalInterface;
import classes.json.JSON;
public class Initialize extends MovieClip {
private var initialized:Boolean = false;
public var _stage:Stage;
public function Initialize(stage:Stage):void {
if(!initialized) this._stage = stage;
gotoAndStop(3);
}
}
}
From Frame 3:
var Ad:Initialize = new Initialize(stage);
Can someone help me out?
Upvotes: 0
Views: 1553
Reputation: 3581
The gotoAndStop method belongs to the stage or movieclip you're attempting to control. If you are looking to control the top level stage, and this example is your document class, then this type of example should work. If, as is more likely, this is a helper class of some sort, you might try:
_stage.gotoAndStop(3);
Upvotes: 1