I am having the tuffest of times doing this.
I have my FLA with a Document Class. I also have one other class, that doesn’t extend anything.
I am trying to pass the stage from the FLA on to my non-Document class. Obviously, the Document Class can see the main stage no problem, but having trouble passing that stage to an external class.
I tried to pass it from Frame 1 in my FLA. I also tried to pass it from my Document Class to my external class, but not working like it should.
Here is the code I have - Starting with Frame 1 in my FLA
var passStage:TitleClass = new TitleClass(stage)
Now, on to my TitleClass (non-Document class / external class)
package {
import flash.display.*;
public class TitleClass {
//random variables here
public var aa:Stage;
public function TitleClass(stageRef:Stage){
aa = stageRef;
trace (aa); //Traced [Object Stage]
trace (aa.test1)//Traced "Access of undefined property test1 through reference with static type flash.display.Stage"
“test1” is a MovieClip on my stage in my FLA. Able to be accessed via document class, unable to be accessed this way
Please help me. I also tried making the TitleClass extend MovieClip, and it still wouldn’t work.