Exit button for .swf or projector?

Hi All,
I am admittedly a complete novice, so please bear with...just completed Lynda tutorial on Flash Pro cs5.
Just trying to do a simple animation with an exit button to close out the player (projector, Flash Player). I have seen several discussions on the same, and have tried all example code to no avail. I am testing through publishing, not preview and it does not function as an exit button.
Have tried:
on(release){
fscommand("quit");
...and...
import flash.events.MouseEvent;
exitButton_mc.addEventListener(MouseEvent.CLICK, function()
        fscommand("quit");
I created the button symbol, selected it and then selected the first keyframe on that layer...entered AS3 window and tried the above code. No luck : /
Any help would be greatly appreciated! I searched through the forum and was unable to locate the answer to this question. Apologies if I missed it somehow.
Thanks in advance!!!

I created an example which works just fine. You can download it here: http://dev.flashlabs.eu/examples/fscommand/source.zip
The source looks like this:
import flash.display.StageScaleMode;
stage.scaleMode = StageScaleMode.NO_SCALE;
btn_exit.addEventListener(MouseEvent.CLICK, exitBtn_clickHandler);
function exitBtn_clickHandler(event:MouseEvent):void {
    fscommand("quit");

Similar Messages

  • Exit Button for Adobe Reader

    Hello,
    I really need to create an exit button for use within Adobe Reader. I am using Adobe Acrobat and will use any javascript that works.
    My understanding is that Adobe does not allow this functionality. Could someone link me an official reason/response as to why this is?
    Also, if anyone has any ideas to get around this, please let me know. These PDFs will open in a program in full screen. A simple exit button, or even a minimize button, would allow them to go straight back to the program. Now it only closes the document, leaving Adobe Reader still open. It just looks unprofessional and adds an annoying step to getting back to the program. Please help.
    Thank you for your time.

    Here where it's documented: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.143.html
    It makes sense because one document should not be able to automatically close Acrobat/Reader, which may have multiple documents opened.

  • How to make Exit button for Out-of-browser application

    Greetings all,
    This sounds so simple, yet I can't find anything about it.  I want to make an Exit button in a Silverlight 4 Out-of-browser application.  When the user clicks the button, the application is to quit or close or exit.  (The same effect as if the user clicks
    the red X icon in the upper right-hand corner of a window.)
    Any ideas will be appreciated.

    Jonathan --
    Yes, the word Page has taken on many meanings in the last 15 years.  I'll clarify.  When I make a simple Silverlight OOB (out-of-browser) application using Visual Studio 2010, I ask Visual Studio to Add New Item, then choose Silverlight Page.  Let's
    say I name it Page2.xaml.
    By default VS2010 already made another page for me, MainPage.xaml.
    Now, here is my need:  On the page called MainPage.xaml, I want to place a large button that says Exit Application.  When the user clicks that button, I want the application to end and the entire window to close.  This is the standard behavior in most traditional Windows
    applications, for example in Microsoft Word or Microsoft Excel or Microsoft Access.  In any of those traditional applications, the user can, from the menu, choose File/Exit.  If he does, then not only does the application quit, but also the window
    closes itself.  The user doesn't have to click the small red X icon in the upper right corner. 
    That simple behavior of almost all traditional Windows applications, large and small, is what I'm looking for in my simple Silverlight
    OOB applications:  An Exit command that quits the application and closes the window itself.
     Sorry for the confusion.  I really appreciate your help.  Any ideas?

  • Replay Button for SWF animation

    Situation: Imported animated SWF file into slide. Using
    Captivate Back and Next buttons to control navigation. I want to
    add a "Replay Demo" button for the animation SWF file.
    Is this possible through Captivate (or Flash)? I don't want
    the continuous loop animation but do I want the option for a user
    to review animation again if desired.

    I hate it when I post something on a forum and then I
    discover the answer 10 minutes later. Ny your answer I'm guessing
    the Captivate add button fweature with a Jump to slide 1 setting"
    is the answer, right?
    That DID fix the replay issue. Now on to second issue. The
    animation blanks out once it finishes playing. While looking for
    the replay answer yesterday, I noticed a post that said something
    about creating a screen capture of the last slide and insert it on
    the timeline or something... back to searching. Thanks for the
    quick reply.

  • Exit button for ActionScript 3.0 class

    Hi
    I want to exit my swf or exe file using the exit button, I try this code but its not working
    package  {
                        import flash.display.SimpleButton;
                        import flash.display.MovieClip;
                        import flash.events.MouseEvent;
                        import flash.system.fscommand;
                        public class b_exit extends SimpleButton {
                        public function b_exit() {
                                  this.addEventListener(MouseEvent.CLICK,clickF);
                        private function clickF(e:MouseEvent):void{
                                  fscommand("quit");

    This one work when you hit the back or home button:
    import flash.system.Capabilities;
    import flash.desktop.SystemIdleMode;
    if (Capabilities.cpuArchitecture == "ARM")
    NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, handleActivate, false, 0, true);
    NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, handleDeactivate, false, 0, true);
    NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys, false, 0, true);
    //==================================================================
    public function handleActivate(event:Event):void
    NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
    //==================================================================
    public function handleDeactivate(event:Event):void
    NativeApplication.nativeApplication.exit();
    //==================================================================
    public function handleKeys(event:KeyboardEvent):void
    if (event.keyCode == Keyboard.BACK)
    NativeApplication.nativeApplication.exit();

  • Exit Button for a Quiz

    Hi Guys,
    Anybody know how to add an exit button to a quiz? I want my quiz to play full screen so the user won't be able to close the window, but I do require an exit button to get off the quiz.
    I don't seem to be able to add a button. Any solutions/workarounds?
    Thanks
    Ali

    You cannot add any interactive object to a question slide, nor to the score slide.
    The only 'hybrid' button you can add is the static button widget, but it has a limited choice of actions, and Exit is not one of them.
    But you could define the action on End of the project (Preferences, Project, Start, End) that is normally set to Stop Project, to Close the project.
    If you really want a button, you'll have to add an extra normal slide on which you'll be able to insert a button.
    Lilybiri

  • Build Exit Button For Web Course

    I hope this is not too generic a question for this forum,
    however, I need to build an exit feature for a web course and I
    have no clue how. I'm using Dreamweaver 8 and I even have .js code
    for exit but have no idea how to link it with the exit icon in the
    course. Can someone walk me through it?

    What is it you are exiting from?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "semaj06" <[email protected]> wrote in
    message
    news:fgv695$8em$[email protected]..
    >I hope this is not too generic a question for this forum,
    however, I need
    >to
    > build an exit feature for a web course and I have no
    clue how. I'm using
    > Dreamweaver 8 and I even have .js code for exit but have
    no idea how to
    > link it
    > with the exit icon in the course. Can someone walk me
    through it?
    >

  • Exit Button script won't work in Adobe Reader 8

    Hello,
    I have this code on Exit button for pdf form:
    app.execMenuItem("Close");
    Or
    to give warning before Exit: Have a second RealExit Button hidden to execute the code
    var answer = xfa.host.messageBox("Are you sure you want to Exit?","Warning Message",2,1);
    if(answer==1){
    RealExit.execEvent('click');
    I tried both the code one at a time but no luck in Adobe Acrobat Version 8, works like a charm in Adobe Acrobat 9
    I would like the user to click the Exit button if they choose to exit. However it doesn't work in Adobe Acrobat 8 but works in 9 version. Is there a work around? Any suggestions???
    Thanks

    This answer may not be a big help but sure will give you some level of understanding....
    Check the URL>>>http://kb2.adobe.com/cps/402/kb402673.html
    Check the section "PDF Forms-related issues:" starting mid page.....
    Not all releases/versions are good. Some releases tend to have some bugs...the version you tested could be one of them. Adobe always recommends to be on the latest version. If client still on older version that is client's problem especially there should not be any restrictions on upgrading to Latest version when the software is free!

  • ESS - Time Accounts- Exit button not working

    We have implemented ESS Business Package, the Time Accounts application's Exit button is not working.
    When we click on Exit, it is not doing anything. In Development env it is working fine, but when it comes to quality it is not working.
    suggest me if we can solve this problem.

    Hi Kiran,
    We had a same problem with "Exit" button for "Benefits Enrollment" in both dev and quality systems. As a workaround we redirected to the specific iView using WDPortalNavigation.navigateAbsolute on clicking "Exit  button".
    Hope this helps.
    Regards,
    Adren

  • Exit button - Germany Personal data service does not work

    Hi all,
    We just upgraded our portal to EP7 Sp22 with 1.3 ESS Business Package and 603 XSS components in the back-end.
    In testing Germany and all countries that use the Germany personal data service, the Exit button on all screens (Overview, Edit, Review and Save, Confirmation) does not work. The Exit button, when selected, keeps the user on the same screen. 
    I am not sure where the button is configured, but it should always take us back to the page from where the service was launched.  So if I accessed through the Overview page or Personal Information page, and then click on the exit button, I should be taken back to one of those pages.
    Where can we configure the exit button for the German Personal data service, so that it works and takes the user back to the page where they started.....?
    Cheers!, Neeta

    Hi,
    The Germany personal data service is the only one where the exit button is not working. All other countries are testing fine.
    Is it a customization issue on the back-end? The resource in spro for germany is configured with the pcd link of the german personal data i-view.
    The other countries are also customized in the back-end with the pcd link of the appropriate i-view.
    Regards, Neeta

  • "Exit" Button to destroy Xlet-why does it not work???

    Hey there!
    I am very confused with KeyEvents in MHP and kind of stuck..
    I just want an EXIT Button for my Xlet-that's all!! I tried to different ways:
    The first one is compiling without any errors but it just does not work, either in XletView 3.6 nor in the IRT Implementation..Is there something i missed?
    Here is (a piece of) my first code:
    public void keyPressed (java.awt.event.KeyEvent KeyEvent) {
    int key = KeyEvent.getKeyCode();
    if (KeyEvent.getSource() == butt1 && key == HRcEvent.VK_ENTER)
    try {
    destroyXlet(true);
    catch (XletStateChangeException ex){
    butt1 is the "Exit" Button.
    I also tried this Code using the dvb UserEvent and UserEventRepository which worked pretty well with XletView, but failed when testing it with the IRT..
    public void userEventReceived(org.dvb.event.UserEvent userEvent) {
    int key = userEvent.getCode();
    if (userEvent.getSource() == butt1)
    if ( key == HRcEvent.VK_ENTER){
    try{
    destroyXlet(true);
    catch (XletStateChangeException ex){
    Why does this one not work with the IRT-Implementation?? Nothing happens at all when pressing ENTER on the RC..
    Has somebody an idea or fixed out which kind of mistake i made?
    As i said i am really stuck and i had a look at many examples, but nothing worked at all!!

    Hello Steve!
    Unfortunately your suggestion did not work too..
    I added context.notifyDestroyed() to destroyXlet(), the problem is that my application does not react on pressing VK_ENTER..
    Do you have any other ideas?
    The second code with dvb events just works without adding notifyDestroyed,
    but just with XletView, not with the IRT RI..

  • Exit button not working Captivate 7 output to HTML5 and SWF

    I have several courses developed in Cp 6.5 that do not have this issue and are currently running on Taleo LMS.
    I've built a test course with 6 (mostly blank) slides, including two quiz questions. On the final slide I have placed a Finish Course button with On Success: Exit action. The project end options are set to close project and I've included an On Exit: Exit action on the final slide. The Finish Course button successfully closes the browser window in Preview in Browser (IE9) and Preview HTML5 output modes.
    I then published the course to both HTML5 and SWF output formats with scalable HTML selected. Once I uploaded the course to the LMS and tested it, the Finish Course button does not close the browser window. I've tested in IE9, Firefox, and iPad, and it doesn't work on any of these. I've also tried including the built in exit button on the playbar, and it doesn't close the window either. At the final slide, after clicking the Finish Course button, the slide fades to white and then stops.
    The LMS reports that the course is complete; I thought maybe it was an issue with the settings in the LMS course, however I have several other courses that were developed in Cp 6.5, published to the same LMS with the same "Exit" button on the final slide, and I have mirrored every course setting that has worked in the past.
    Any suggestions as to what could be keeping the window from closing?
    Thanks,
    PV

    Why does there need to be a button used now when in CP 6 and 6.5 it worked seamlessly? Will this be fixed by Adobe and when?
    Adam Lynch
    Senior Media Specialist
    Project Lead The Way, Inc.
    3939 Priority Way South Drive, Suite 200
    Indianapolis, IN 46240
    phone: 317.669.0845  | mobile: 518.469.7617
    fax: 317.663.8296
    www.pltw.org<http://www.pltw.org/>
    Preparing students for the global economy. Now even earlier.
    PLTW Elementary coming fall 2014. Click here to view the trailer<http://www.youtube.com/watch?v=rikLnSAoTpQ>.
    Confidentiality Notice: The information transmitted is the property of the sender and is intended only for the person or entity to which it is addressed and may contain confidential and or privileged material.  Statements and opinions expressed in this e-mail may not represent those of Project Lead The Way, Inc.  Any unauthorized review, retransmission, dissemination and other use of, or taking of any action in reliance upon, this information is prohibited.  If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and delete the material from any computer.  If you are the intended recipient but do not wish to receive communications through this medium, please so advise the sender immediately.

  • How to terminate or exit a for loop when the user clicks on stop button

    Actually my problem is to stop a loop when i click on stop button.
    example:i have two buttons 'start' and 'stop'
    in start buttom i wrote a for loop as
    dim i as integer
    For i=1 To 100000
    print i
    Next
    when i click on start buuton it prints 'i' value up tp 100000.
    my question is when i click on 'Stop' button the for loop has to terminate or Exit from the  loop and should stops the execution.
    Is it possible to termianate or Exit the 'for loop'
    PS.Shakeer Hussain
    Hyderabad

    I am unable to stop the loop and application not at all allowing to Press the Stop button.
    It seems like Hung, any advise ?
    Private Sub btnStart_Click(sender As Object, e As EventArgs) Handles btnStart.Click
            btnStop.Enabled = True
            btnSelectFile.Enabled = False
            btnStart.Enabled = False
            btnStop.Focus()
            Dim strFileName As String = txtFileName.Text.ToString
            Dim strLineText As String
            If System.IO.File.Exists(strFileName) = True Then
                Dim objReader As New System.IO.StreamReader(strFileName)
                While objReader.Peek() <> -1 And stopclick = False
                    strLineText = objReader.ReadLine()
                    MsgBox(strLineText, MsgBoxStyle.Information)
                    Application.DoEvents()
                    Thread.Sleep(My.Settings("strDelay") * 1000)
                    'System.Diagnostics.Process.Start(My.Settings("strFireFoxLocation"), strLineText)
                End While
            End If
        End Sub
        Private Sub btnStop_Click(sender As Object, e As EventArgs) Handles btnStop.Click
            stopclick = True
            btnSelectFile.Enabled = True
            btnStart.Enabled = True
            btnStop.Enabled = False
        End Sub
    Raman Katwal
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Custom Exit Button not working..looks for required input field on screen?

    I defined this EXIT button as type E in Menu Painter.
    I am using "MODULE At EXIT-COMMAND" in my PAI.
    SAP message still asks for the required input field when I select the function EXIT button?
    The logic still will not break into the At EXIT-COMMAND of my PAI?
       Thank-You.

    Hi
    Have you assigned variable OK_CODE in the list of screen element?
    IF NOT zin_railid is initial.
        LEAVE TO SCREEN 0100.
    ENDIF.
    Which is the sense to create a button for exit-command and doesn't allow the exit if the input field is empty?
    In SE41 I entered "Back" over the back button, "EXIT" over the exit button, and "CANCEL" over the cancel button.
    I selected each one, and got a popup to enter "E" for each type. As I said they appear, but do nothing?
    Did I need to set a status for these?
    No you don't, it's only important to define a functional having the attribute for EXIT-COMMAND
    Max
    Max
    Edited by: max bianchi on Nov 5, 2010 6:31 PM

  • FB70: User exit when the save button (for posting) has been click

    Hi ABAP Gurus,
    With regard to FB70, can anyone provide me the name of the user exit that will be triggered when the save button (for posting) has been clicked?
    Thanks!
    <b>
    Best Regards.
    Brando</b>

    Hello Brando,
    With FB70 I recommend you implement the user-exit via the Business Add-In (BADI) way and avoid SMOD exits if possible.
    The list below are the BADIs that are called by the <b>ECC6.0</b> system after you click the <b>Save</b> button to post a document. <u>They are listed in the order which they are called before the actual post</u>. You'll have to find the right one as per your requirement - you can view their definition via transaction SE18 then after you find the right one you need to use that definition to create an implementation via SE19. Here again, you'll have to choose the right method that suits your requirement. You'll find the method and class documentation in some cases with examples on how to implement, you need to write the code between the Method..EndMethod statement using the parameters provided by the Method.
    1. PPA_CUST_BADI
    2. FI_RES_ITEM_CURRENCY
    3. AC_QUANTITY_GET
    4. BADI_PRKNG_NO_UPDATE
    5. FM_POP_CORE
    6. FMRI
    7. FMRE_BUS_PROCESS
    8. FAGL_SET_SEGMENT
    9. EXIT_XFMPR1_001
    10. BUAVC_CHECK_RESTRICT
    11. UKM_R3_ACTIVATE
    12. CO_DOCUMENT_INFO
    I spent a bit of time debugging FB70 to find this info for you, please appreciate by rewarding points (or else
    Good luck.
    Cheers,
    Sougata.

Maybe you are looking for

  • How do I back up my itunes library to a dvd

    This choice is no longer available under File>Library. How to you back-up?

  • Please help me, I need to use Flex with CF

    Hi everyone, I am starting to retract my brain from an intense 2 days to figure out how to use Flex with Coldfusion. I am using Coldfusion 8 Beta (this part is good, don't need help for CF itself). I am also using Flex Builder 2 (with chart but this

  • Solaris re-installation

    I am new with Solaris, I have a SunBlade 100 with Solaris 10 installed, I am trying to learn how to install Solaris by re-installing the OS but when I run the DVD nothing appears in the softwareinstallation box. Should I wipe the drive clean before I

  • ARV_BC_XMB_DEL Fails With Raise Exception

    Hi All,     I have scheduled the archiving job in PI 7.0 through sxmb_adm -> Schedule Archiving.     After scheduling I can see two jobs successfully released             1. ARV_BC_XMB_DEL - This job uses the program "RSXMB_DELETE_ARCHIVED_MESSAGES"

  • Find number of external files?

    I have a swf loading mp3s from an external folder. The number of mp3s will vary from time to time. Is there a way to determine how many mp3 files there are in the external folder... without the use of a data file such as .xml? Many thanks in advance!