Ok, this is basic stuff: listening to an event dispatched from a loaded swf. What am I doing wrong?
Container.swf has the following code:
import mx.events.EventDispatcher;
EventDispatcher.initialize(this);
function runFunctionAfterEvent() {
trace("Yes, I hear ya")
}
var tar:MovieClip = this.createEmptyMovieClip("mcHolder", this.getNextHighestDepth());
tar.loadMovie("loadedSwf.swf");
addEventListener("THE_EVENT_NAME", runFunctionAfterEvent);
Loaded.swf contains the following code
import mx.events.EventDispatcher;
EventDispatcher.initialize(this);
function sendOffAnEvent() {
dispatchEvent({type:'THE_EVENT_NAME'});
}
setTimeout(sendOffAnEvent, 1000);
Thanks
PS, “disclaimer”: I originally posted this on actionscript.org but didn’t get a proper reply. Hope I’m not pissing off anyone by reposting here.