I have an Flash AS3 project that loads external SWFs and controls them in different ways. On some of the loaded SWF files, they have a "Next Selection" button that takes you to a new presentation. On my main externally loaded SWF, I have the code:
setTimeout(function() {dispatchEvent(new Event("nextPresentation", false));}, 4000);
Which automatically move to the next selection in the set. This code works exactly the way I want.
In the next loaded SWF, instead of having a timeout, the user goes through the whole thing where at the end of all the timelines there is a button that says next selection. So I added the following code there:
function nextSelectionClick(evt:MouseEvent) {
trace('here123');
dispatchEvent(new Event("nextPresentation", false));
}
For some reason, that event never makes it up to the file that loaded the SWF. I'm sure I'm getting to the click event because I get the trace, but the event never makes it up even though it seems like it should be the exact same behavior as the timeout. What am I missing here? Why would that code behave different from a button click than from a timeout?
Thanks