PDA

View Full Version : Close button in Flash


ahbenshaut
11-28-2001, 04:09 PM
I created a button for the purpose of closing a Flash movie and returning to a different html page, but ( of course ) it doesn't work. HELP!!!

Ricod
11-28-2001, 05:46 PM
Well, what DOES it do ? We're going to need a little more info here. What did u code and what was your setup ? :)

spoonyg
11-28-2001, 05:51 PM
what's the code?
is it?:
on (release) {
getURL ("javascript:self.close()");
}

ahbenshaut
11-28-2001, 05:54 PM
Here is what I did:
I created a form. Once the form has been filled out and submitted, I would like a way for that window to be closed and the user redirected back to the default page. I used the getURL for the close button to another html page but it displays the page in the window that I want closed.

ahbenshaut
11-28-2001, 05:59 PM
Spoonyg

spoonyg
11-28-2001, 06:01 PM
yes?

ahbenshaut
11-28-2001, 06:02 PM
Spoonyg, I tried that code before but a message boxes appears with "The web page you are trying to view is trying to close the window. Do you want to?"

spoonyg
11-28-2001, 06:05 PM
I created a form. Once the form has been filled out and submitted, I would like a way for that window to be closed and the user redirected back to the default page.

have you tried:
on (release) {
getURL ("javascript:self.close()");
}
I used the getURL for the close button to another html page but it displays the page in the window that I want closed.

im confused:
what is the other html page?
is the form in a popup window that youve launchd?

ahbenshaut
11-28-2001, 06:09 PM
I think I figured this out. I used the code that spoonyg gave me, and created a javascipt function called "closer" on a close.htm. In the <Body> tag using the onload, I called that function and it closes the window.
<body onload="javascript:closer()">

Thanks for all of the help :)

fpanko
11-29-2001, 10:10 PM
you can just insert the javascript directly in flash. you just don't need those quotes. I have ex example you can download with some other javasrcipt elements too. You can find it at:
www.geckoarts.com
under june 12
hope this helps, frank