Be a Supporter!

Need code for a button!

  • 312 Views
  • 4 Replies
New Topic
CubePanda
CubePanda
  • Member since: Jun. 3, 2008
  • Offline.
Forum Stats
Member
Level 09
Writer
Need code for a button! 2012-10-02 18:49:10

For the past four days I have been looking for this code.
Basically, I have a button at the end of a flash, that when you lick it CLOSES the flash.
However, I don't know the code.
I can't find it anywhere on the internet and the technicians or IT teachers at my school don't know jack shit about Flash or AS2 to fix it or help me!
What I have found, is that the internet suggest the following:
on (release) {
fscommand ("quit")
}
OR RATHER
on (release) {
getURL("javascript:window.close();void(0);");
Okay, first of all, NONE of these work for my situation.
My flash will be used by people in control+enter format, so .exe code or browser code ARE NOT GOING TO WORK.
I would be SO GRATEFUL if someone could help me out here. Thanks.


http://www.kieranballroll.webs.com
www.youtube.com/swordofonion
Like naked girls having sex with each other? Then join the Meat Collab.

BBS Signature
Momo-the-Monkey
Momo-the-Monkey
  • Member since: Oct. 15, 2005
  • Offline.
Forum Stats
Member
Level 45
Musician
Response to Need code for a button! 2012-10-02 19:03:36

At 10/2/12 06:49 PM, CubePanda wrote: For the past four days I have been looking for this code.

Four days? I'd be pretty frustrated if I searched for a simple piece of code for four days. I think this will sooth your pains (or not).


Hello, from the past!
[ PHP: Main ]

BBS Signature
CubePanda
CubePanda
  • Member since: Jun. 3, 2008
  • Offline.
Forum Stats
Member
Level 09
Writer
Response to Need code for a button! 2012-10-02 19:09:05

At 10/2/12 07:03 PM, Momo-the-Monkey wrote:
At 10/2/12 06:49 PM, CubePanda wrote: For the past four days I have been looking for this code.
Four days? I'd be pretty frustrated if I searched for a simple piece of code for four days. I think this will sooth your pains (or not).

Oh fuck nuggets. Thanks for the help man.
Also, reason it's four days is I only get 1 hour a day to look this shit up.
Fucking school, man.


http://www.kieranballroll.webs.com
www.youtube.com/swordofonion
Like naked girls having sex with each other? Then join the Meat Collab.

BBS Signature
egg82
egg82
  • Member since: Jun. 24, 2006
  • Online!
Forum Stats
Supporter
Level 05
Game Developer
Response to Need code for a button! 2012-10-02 19:30:33

At 10/2/12 07:09 PM, CubePanda wrote: Oh fuck nuggets. Thanks for the help man.
Also, reason it's four days is I only get 1 hour a day to look this shit up.
Fucking school, man.

well, if you're using AIR (probably not, but hey, it's worth mentioning) you can close it by just calling

stage.nativeWindow.close();

of course, AIR compiles into a .air package, which is an installable.
but you an do a LOT of cool stuff with AIR. You're not limited to anything.


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
egg82
egg82
  • Member since: Jun. 24, 2006
  • Online!
Forum Stats
Supporter
Level 05
Game Developer
Response to Need code for a button! 2012-10-02 19:48:33

oh, and something about a Flash Forum

I forgoteded.


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature