Close_Button

This may be very basic to some but here goes -

I am using Flash MX to create a website with several different swf’s that open independently in there own windows but as an alternative to using the x button I want to create a close window button on the page which will well close the window.
Is this a Actionscript? or Javascript? issue.
What is the best way to do this?
Thanks

http://www.mxexhibits.com/collateral/main_creative.html

here is a link to the main window then links to the individual pieces that open and then I need to close with the button!

use this as your link:

javascript:window.close();

Rev:elderly:

Thanks!

It works - although is there anyway to not have it bring up the alert box saying “The Web page you are viewing is trying to close the window”
with YES NO buttons?

I think this will work…Lostinbeta did this bit of code for me…=) thanks again Lostinbeta:P

put this in your < head>

< object id=closeWin type=“application/x-oleobject” classid=“clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11”>
< param name=“Command” value=“Close”>
< /object>

(take out spaces after < )

Rev:elderly:

Yes you are right about that part rev.

But to close the window, I believe you need to add this script to the button(as well as have the script rev provided in your HTML page)…

on(release) {
getURL(“javascript:closeWin.Click()”);
}

Ah!
Thank you both very much - that is exactly what I was after!

I swear this forum and all the help that is available from great scripters, designers, and everyone else saves an enormous amount of time and energy.

Again I appreciate it all very much!

Just doin’ our part to help the Flash community :beam:

Glad we could help you out:)

thanks Lostinbeta, you are the greatest:P

Rev:elderly:

Thanks rev :beam: Now I am blushing :slight_smile:

aw come-on do a little dance…:stuck_out_tongue:

Rev:elderly:

:::dancing to song:::

make a little love…

get down tonight…

oh yeahhhhhhh…

You are too young to remember that tune=)

Rev:elderly:

Yeah, I think that is the only part I know of it. :-\

Oh well…

:::keeps dancing:::

boogie on…=)

Rev:elderly: