PDA

View Full Version : click: new (controllable) window



hmmaah
February 6th, 2003, 12:05 PM
hey girls and boys - i have a quick question for you. ACTUALLY i just thought of another one so now i have two. sorry. hope you don't mind. i get sidetracked rather easily.

before i start, a quick nota bene. i'm a complete newcomer to flash so my questions are very simpleminded. not much of a challenge i'm afraid.

1. can i put a link in my movie that will close the window?

2. can i put a link in my movie that will open a new window of a specific size, and without the menu-buttons of explorer?

any help: much appreciated.
cheers, anrick...

kode
February 6th, 2003, 12:14 PM
to close the window use this script

instanceName.onRelease = function () {
getURL ("javascript:close()")
}
replace instanceName with the actual name of your movie clip or button


and there's a tutorial about popup windows here
http://www.kirupa.com/developer/mx/centered_popup.asp


[ EDIT ]
hmmm .. and remove the space between java and script

senocular
February 6th, 2003, 12:25 PM
note the space in javascript is added by the forum to prevent malicious code, its not included in the actual script.

You may also see the close() written as self.close(); or window.close(); - its all the same thing. Be aware that a window not specifically opened by the browser itself will get a warning message on an attempt to close the window on windows machines.

[edit] just saw your edit ;)


instanceName.onRelease = function () {
getURL ("javascript:close()")
}

quote this and see how its written :)

hmmaah
February 6th, 2003, 12:33 PM
thanks a lot peoples!! you're lovely.

senocular
February 6th, 2003, 12:33 PM
its all kax on this one ;)

kode
February 6th, 2003, 12:41 PM
no problem hmmaah =)

and no sen .. you posted those statements about the self.close() and window.close() that i didn't .. besides the warning. i knew that but i didn't posted it so .. :sigh:

and by the way .. thanks for the tip of the quoting :)

senocular
February 6th, 2003, 12:44 PM
yeah but thats just little cr*p I sometimes post after other answers which dont count... and sometimes they makes it seem like Im trying to belittle whoever it is that just posted (you) though I wasnt.
:)

kode
February 6th, 2003, 12:50 PM
belittle ?? lol :P

nope .. it's great to have someone like you here ;)

lostinbeta
February 6th, 2003, 01:01 PM
You stopped stalking me Sen :(


I enjoyed your belittlement :)!!!!!!

senocular
February 6th, 2003, 04:24 PM
:belittles lostinbeta:

;)

lostinbeta
February 6th, 2003, 04:58 PM
YAY!!!!!

:beam: