Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-23-2003, 01:49 AM   #1
bengstr
Registered User
 
Join Date: Dec 2003
Posts: 5
Default Exit button in flash movie?

This should be an easy one...all I want to do is put a button in my flash movie that closes the movie. I've found code that says to use:

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

or

on (release) {
fscommand("quit");
}

Neither seems to work. What is the trick to getting a button to exit out of the flash demo?

Thanks,
Brett
bengstr is offline   Reply With Quote
Old 12-23-2003, 02:32 AM   #2
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

is the movie view in a browser or as a projector?
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 12-23-2003, 10:13 AM   #3
bengstr
Registered User
 
Join Date: Dec 2003
Posts: 5
Default

I've tried publishing to html and doing it in a browser (IE6) and I've tried exporting to a swf and using a standalone player. Not having any luck with either. This is my first real experience with flash, so I'm probably doing something silly??

Thanks,
Brett
bengstr is offline   Reply With Quote
Old 12-23-2003, 10:15 AM   #4
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

first one would work in browser, second one is for stand alone player

maybe you should up your fla

cheers
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 12-23-2003, 10:30 AM   #5
bengstr
Registered User
 
Join Date: Dec 2003
Posts: 5
Default

Here's the fla... I also just discovered last night that the fla doesn't look right on my home pc, but looks good here at work. Even though the fla's looked much different, the swf's looked exactly the same. Is this normal? Thanks for any advice on the exit button in scene 6.

Brett
Attached Files
File Type: zip hb_demo.zip (980.3 KB, 2612 views)
bengstr is offline   Reply With Quote
Old 12-23-2003, 11:03 AM   #6
binkyboo
Senior Member
 
binkyboo's Avatar
 
Join Date: Mar 2002
Location: Madison, Wisconsin
Posts: 1,312
Send a message via MSN to binkyboo
Default

Try this.

ActionScript Code:
on (release) { getURL("javascript: parent.close()"); }

Last edited by binkyboo; 12-23-2003 at 11:05 AM.
binkyboo is offline   Reply With Quote
Old 12-23-2003, 01:03 PM   #7
bengstr
Registered User
 
Join Date: Dec 2003
Posts: 5
Default

I tried that and it didn't do anything with the HTML or SWF... I'll see what else I can come up with?
bengstr is offline   Reply With Quote
Old 12-23-2003, 07:00 PM   #8
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

you have a button inside a button - this is bad
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 12-23-2003, 07:37 PM   #9
bengstr
Registered User
 
Join Date: Dec 2003
Posts: 5
Default

Billy T.

Thanks a million! That was my problem, no doubt about it. I appreciate your troubleshooting.

Brett
bengstr is offline   Reply With Quote
Old 12-23-2003, 07:39 PM   #10
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

no prob
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:03 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.