Groups | Blog | Home
all groups > flash (macromedia) > august 2004 >

flash (macromedia) : how can i close a window?


anakadote
8/29/2004 10:27:12 PM
can someone please tell me what code to attach to a button in flash to make the html window it's embedded in close?
pwiop
8/30/2004 1:25:43 AM
Im not sure but I think you'd need to use javascript to close the window and if
that is the case I also believe you would have to have first opened the window
using javascript

Sorry for being no help at all - ooooops

p a u l
launchpad67a
8/30/2004 3:13:26 AM
Here's the code:

on(release){
getURL("javascript:window.close();");
}

The window does Not need to opened with java for this to work.

urami_
8/31/2004 11:16:09 AM


[quoted text, click to view]

Tho it will prompt a WARNING dialog asking user to give permission to the closing.
It's a good solution for POP UP windows .
For parent and pop up , to avoid the warning, use the following :

getURL("javascript: window.opener=self; window.close();");

--


Regards


urami_*

<hol>
http://flashfugitive.com/
</hol>


By The way:
If you try to mail me , DO NOT *laugh*
AddThis Social Bookmark Button