I have spend so long searching for an answer on the web but can not find any that works, please help!
I'm not even sure if this is possible but if anyone can guide me in the right direction I would most appreciate it!
Basically what I would like to do is to load a swf in to my flex application - contrary to my post title it doesnt even have to be embedded - when the loaded swf finishes playing it's animation I want for it to dispatch an event and for flex to listen for that event and trigger a function when the event is captured.
The animation is made in Flash CS3. I have not used any classes, rather on the last frame I set up an action to dispatch an event like this:
In my Flex Application I load my swf using swfLoader and I add an event listener to it like so:
and my function is like this:
private function test():void
This is not working at all and I'm sure I am missing something but I cant seem to find any straightforward answer on the internet!
Is it at all possible for a swf made in flash to communicate with flex??
Since they are both written in AS3, I figured it would be easy but alas!
If anyone can help me I would most appreciate it, thank you in advance!!
By the way I have also tried:
but no luck....
You have to wait for the swf to complete loading before adding the event listener.
When are you adding the event listener?
Have a look at the SWFLoader complete event: