How can I call the built-in swfs function from Javascript?
I have a swf which is a preloader for another swf (game). I need to respond to a swf game from Javascript but can't figure out how to do it. I can call back to the preloader by registering the callback with ExternalInterface.
I tried document.getElementById("preloader")
which returns an object. preloader
has a public property called GameObj
that returns a reference to the game object that was loaded by the preloader.
Problem: document.getElementById("preloader").GameObj
always null
.
Is it possible to do this or do I need a shell call in the preloader?
source to share
Well, you can use ExternalInterface , but is there some reason why you can't put your preloader in the same swf?
source to share