[LEFT][COLOR=#000000][FONT=Arial]I am having problems so I made a very basic main.swf that loads sub.swf.[/FONT][/COLOR][COLOR=#000000][FONT=Arial]Sub.swf has 2 rectangle movieclips (red and blue) that have their alpha = 0.[/FONT][/COLOR][COLOR=#000000][FONT=Arial]Both swfs compile fine and no errors but the red alpha does not get turned on so the value of “spanish” from main.swf variable must not be getting recognised in sub.swf. Any ideas?
[/FONT][/COLOR][COLOR=#000000][FONT=Arial]Main.swf actionscript:
[/FONT][/COLOR][/LEFT]
import flash.display.Loader;
import flash.display.MovieClip;
import flash.events.Event;
var child_loader:Loader = new Loader();
var req:URLRequest = new URLRequest(“sub.swf”);
child_loader.load(req);
child_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
function done(e:Event):void{
addChild(child_loader);
MovieClip(child_loader.content).language = “spanish”;
}
sub.swf actionscript:
import flash.display.Loader;
import flash.display.MovieClip;
import flash.events.Event;
function callFunction(_txt:String):void{
var sublanguage = (MovieClip(parent.parent).language);
if (sublanguage == "spanish"){
red.alpha = 1;
}else if (sublanguage == "english"){
blue.alpha = 1;
}
}