i have a function(initialize) inside the a.as File.i want to access the that Variable from aaa.fla file?.How Can i access the Variable?my main class is a.as file ,inside a.as file i load the aaa.swf file
AnyBody Help me
Thanks in advance!
public function initialize(parameters:Object, stage:Stage,
loaderInfo:LoaderInfo, pluginHostWhitelist:Array):void
{
sourceId=loaderInfo.parameters.src;
addText();//Inside this function i load the aaa.swf file,
//here i want to access the variable "sourceId"
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
addText(){
_loader.load(new URLRequest("aaa.swf"));//while running this a.as i want to get the Sourceid Value
mainContainer.addChild(_loader);
}
My aaa.fla Its in Another place
import fl.motion.ColorMatrix;
import flash.filters.ColorMatrixFilter;
var sourceId:String// here i want to access the "sourceid" variable from a.as file
trace(sourceId)
————————– start edit ———————————–
A .fla file is a Flash IDE document!
Where does your sourceId variable come from?
In your example, it seems to come from flashvars, meaning that you would get the value from your SWF embedding code.
If this is the case, this wouldn’t be relevant in your .fla file, because you wouldn’t load an external swf using HTML embedded code.
Let’s forget about flashvars for the time being… Are you using a Document Class with your .fla file? If not, I would advise you to, it’d make coding a lot easier. If yes, I suppose that you would load the external SWF there.
In the external SWF you could event use Custom Event Dispatching to pass your vars…
———————- end edit —————————–
Your question is really not clear… I can only go by the code example you give