Hi,
Thank you very much for your patience. Here is the code for the parent fla (SwfLoadTrial):
import flash.display.*; import com.greensock.*; import com.greensock.easing.* import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; var queue:LoaderMax = new LoaderMax(); queue.append( new SWFLoader("checkExpressionTrial.swf", {estimatedBytes:3000, container:this, x:250, y:100, autoPlay:false, onComplete:completeHandler})); queue.load(); function completeHandler(event:LoaderEvent):void { event.target.rawContent.testString = "it's here"; trace("rawContent: " + event.target.rawContent.testString); //Correct - event.target refers to the SWFLoader trace("it's loaded"); }
Here is the code for the document file (MainCA) for the child swf:
package { import flash.display.MovieClip; public class MainCA extends MovieClip { private static var rootInstance:MainCA = null; var myCA2; var myCARF; var testString:String; var matchingParentheses:Boolean; //public function Main() class constructor public function MainCA() { rootInstance = this; myCA2 = new CheckAnswer2; myCARF = new C_aRelationalFunctions; myCARF.setProbLevel(0); myCARF.setProbNumber(0); myCARF.setProbFunction(0); numericalAnswer_txt.text = String(myCARF.returnFunction(inputExpression_txt.text)); showTestString(); } function showTestString():void { testString_txt.text = testString; } //function to get root instance of Main public static function getInstance():MainCA { return rootInstance; } } }
the error I get now is: Error #1056: Cannot create property testString on MainCA.
Sorry, how do I send the .zip file?