TomF
08-04-2009, 04:28 PM
Hi,
I have a flash movie that I want to be able to set to a certain scene on page load using a javascript callback.
I have registered a function (gotoRegion)within the movie using actionscript that the javascript calls.
In the javascript I get the movie object from the page (tested - working) and then call the gotoRegion() function:
movie.gotoRegion(region);
If I run this after the DOM has loaded I get a JS error "gotoRegion is not definied." If I force user interaction by adding an alert(''); before the call to gotoRegion() then the flash moview responds and moves to the correct scene.
Any ideas?
I have a flash movie that I want to be able to set to a certain scene on page load using a javascript callback.
I have registered a function (gotoRegion)within the movie using actionscript that the javascript calls.
In the javascript I get the movie object from the page (tested - working) and then call the gotoRegion() function:
movie.gotoRegion(region);
If I run this after the DOM has loaded I get a JS error "gotoRegion is not definied." If I force user interaction by adding an alert(''); before the call to gotoRegion() then the flash moview responds and moves to the correct scene.
Any ideas?