PDA

View Full Version : Flash splash page with Javascript



jamie_di
12-02-2008, 11:56 AM
1) Script Title: Splash page script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex3/dynamicsplash.htm

3) Describe problem:

Basically I have a flash splash page without the header on the script. Instead i have a button, in the swf, which needs to have the javascript action to close the splash page window, I think it's something simple that I am doing wrong, I hope :)

The actionscript for my button in the flash movie is as follows:

b1.onRelease = function() {
getURL("javascript:splashpage.closeit();");
;
}
But when I click the button, nothing happens, I have to rely on the auto-close feature of the script. Any idea's of why the javascript isnt working? I did start to wonder is it because the script i have is in a nested movieclip, but that didnt stop getURL from opening a new window if i change it from javascript.

Any help at all would be much appreciated :)

ddadmin
12-03-2008, 08:36 AM
Is b1.onRelease a Flash event handler that executes any JavaScript code put inside it when the Flash button is clicked on? If so, try this instead:


b1.onRelease = function() {
splashpage.closeit();
}