Didn’t get any takers on the last question so I thought I would try again. I am getting a compiler error when I try to use a gotoAndStop function in a static method in one class that is being activated by a button in another class.
Line 33 1180: Call to a possibly undefined method gotoAndStop
Here is the code for the Main Script
package scripts
{
import flash.display.MovieClip;
import flash.events.;
import flash.utils.;
public class MainScript extends MovieClip
{
public function MainScript()
{
gotoAndStop(“home”);
var advance:buttonMovie = new buttonMovie();
advance.x = 10;
advance.y = 10;
advance.buttonMode = true;
addChild(advance);
advance.addEventListener(MouseEvent.MOUSE_DOWN, onAdvanceClicked);
}
function onAdvanceClicked(event:MouseEvent):void
{
gotoAndStop(“page2”);
}
public static function onAnotherButtonClicked(event:MouseEvent):void
{
trace (“This button was clicked from the submovie”);
gotoAndStop(“page3”);
}
}
}
And here is the code from the SubScriptTool with the button function that calls the script.
package scripts
{
import flash.display.MovieClip;
import flash.display.Sprite
import flash.events.*;
public class SubScriptTool extends MovieClip
{
public function SubScriptTool()
{
var anotherbutton:buttonMovie = new buttonMovie();
anotherbutton.x = 43;
anotherbutton.y = 243
anotherbutton.buttonMode = true;
addChild(anotherbutton);
anotherbutton.addEventListener(MouseEvent.MOUSE_DOWN, MainScript.onAnotherButtonClicked);
}
}
}
any help would certainly be appreciated.