I have an AS3 swf that I am using mainly to load another AS2 swf. AS3.swf is embedded in a HTML which uses Flashvars to pass parameters to AS3.swf. AS3 successfully loads AS2 and Flashvar values are collected into local AS3 variables.
AS2 has a text_field str1 and I want to pass to it, the Flashvar value collected by AS3 in the local var as depicted by code below.
myVar = flashVar1; // Flashvar collected in local variable in AS3 . . // load the AS2 using loadBytes. var myL : Loader = new Loader(); myL.loadBytes(bytes, new LoaderContext(false, new ApplicationDomain())); addChild(myL); . . // DOES NOT WORK. str1.text = myVar; // wanting to pass the value of AS3 variable myVar to textbox str1 in AS2.
- How to pass the value of myVar (AS3) to str1.text (AS2) ??
- Is it possible to remove AS3 altogether once the varable value is collected in the AS2.
Right now my AS2 is loaded on top of AS3 and the the scene 1 of AS2 overlaps the scene 1 of AS3. Hence I would like to just remove AS3 once it has done the needful.
I hope I am able to explain this clearly enuff.
Thanks loads !!