okay well its a bit hard to show the actual code (cause its long and messy) so ive made this small and simple fla file (Attached) to better demonstrate my need.
on the main timeline, in the "AS Root" Layer:
Code:
var String1:String="Hello ";
var String2:String="World!";
function OutPut():void{
trace (String1+String2);
}
OutPut();
in the Movieclip HomeContent in the "AS Home" Layer:
Code:
btnOutPut.addEventListener(MouseEvent.MOUSE_DOWN, LetSee);
function LetSee(evt:Event):void{
String1="Welcome "; // A variable declared on the main timeline, AS Root layer frame1
String2="Stranger"; // A variable declared on the main timeline, AS Root layer frame1
OutPut(); // A function declared on the main timeline, AS Root layer frame1
}
/*---------------------Error Messages---------------------
1120: Access of undefined property String1.
1120: Access of undefined property String2.
1180: Call to a possibly undefined method OutPut.
--------------------------------------------------------------*/