You definitely can do this.
You register it like this:
and call it like this from JS:
Thank you for your reply.
If the flash is brought in via an iframe, is this still possible, and if so how do you reach the swf content?
Let me explain a bit more in detail what I am doing:
The page includes several HTML widgets, let us say they are called:
widget_1 importing flash_file_1.swf
widget_2 importing flash_file_1.swf
widget_3 importing flash_file_1.swf
widget_4 importing flash_file_1.swf
All the widgets are loading on page load but only some of them are visible.
The swfs are essentially flash files that have sub navigation buttons.
This is my way to get multiple pages to be accessible in one widget.
Clicking a button takes you to a different frame with a different page layout.
Some of the pages contain Flash video which auto starts. (they are located each in their own movie clip)
My objective is to be able to stop any video that might be running when clicking another button for another widget.
Currently each swf is delivered in an iFrame that calls up a HTML page with the Flash object in it.
This allows me to send the content of each iFrame to about:blank when clicking another button (essentially unloading the iframe content) and load it again on demand.
This however causes the iFrame content to disappear for a moment and reload, which is not a very elegant user experience.
It kills the benefit of the content preloading.
The Flash object could be located directly in the HTML widget if that would work better.
That way I could say something like this:
widget_1 importing flash_file_1.swf : go to and play frame 1
widget_2 importing flash_file_2.swf : go to and stop on frame 15.
widget_3 importing flash_file_3.swf : go to and stop on frame 10.
widget_4 importing flash_file_4.swf : go to and stop on frame 20.
widget_1 importing flash_file_1.swf : go to and stop on frame 10.
widget_2 importing flash_file_2.swf : to and play frame 1
widget_3 importing flash_file_3.swf : to and stop on frame 10.
widget_4 importing flash_file_4.swf : to and stop on frame 20.
-and so on…
This would be beautiful! I would be able to keep the swfs loaded at all time and be ready to play as soon as the next button is clicked.
Question 1: Would I have to add any code to the flash files?
Thank you for your time!