enter code here
Been really frustrating just trying to load a swf from a swfloader in Flex and then accessing it's content. I'm sure once I figure out how to do it once then it'll be fine, but I've gone thorugh a bunch of tutorials and somethings not right. Here's my flex code:
and the as code:
public function initHeaderSwf():void { trace("INITIATIED"); //trace(headerSwf.content['weekNo'].text = "TWRTWERWEWE"); headerSwf.addEventListener(Event.COMPLETE, onHeaderLoaded);
}
private function onHeaderLoaded(evt:Event):void
{
trace("LOAD YOU JERK! = " + headerSwf.content['weekNo'].text);
}
Here's the problem:
The swf loads, there is no problem there. I see it in my compiled swf. but the complete event doesn't fire. CreationComplete will fire, and then I try, after that, to make a event listener for loading the actual swf, that doesn't fire. I've tried it a variety of different ways with no luck.
All I am trying to do is change a text field in the loaded swf. I imagine this might be a problem with the sequence of things loading or something like that, but not sure.