A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: how do I quit?

  1. #1
    Junior Member
    Join Date
    Jul 2002
    Posts
    5
    I'm trying to make a button quit the Flash player using an ActionScript...but it's not working? it appears to be a very simple task in all the books, yet I can't seem to get it to work - here's my code:

    getURL("fscommand: quit")



    do I need to add anything else to this?

    thanks!

  2. #2
    not sure, maybe try getting rid of the space between the : and the quit")

    just a thought :s

  3. #3
    Junior Member
    Join Date
    Jul 2002
    Posts
    5
    didn't help...but thanks.

  4. #4
    Actually the Space is the issue. LiveMotion 2.0 has a bug with all FSCommands that are used from the Script Editor. It adds a space between the fscommand and the action.

    getURL("fscommand:quit") should work just fine. As an example, I have a player file fore a presentation, that does a fullscreen, no scale, disable mouse, trap all keys accept the esc key, and close the player. Here are all the FSCommands I use in this one player file.

    // Force Player to Full Screen
    getURL("fscommand:fullscreen", true);

    // Do not scale the composition
    getURL("fscommand:allowscale", false);

    // Disable the Flash Player Menu
    getURL("fscommand:showmenu", false);

    // Hide the Mouse Cursor
    Mouse.hide();

    // Force all keystrokes to the flash player
    getURL("fscommand:trapallkeys", true);

    // Quit the Flash Player
    getURL("fscommand:quit")

    // When the Enter Key is pressed, quit the Flash Player
    if(Key.isDown(13)){
    getURL("fscommand:quit");
    }

    Now these are all at different keyframe scripts, and events, but its everything in the file. ;-)

    Enjoy!

  5. #5
    Junior Member
    Join Date
    Jul 2002
    Posts
    5
    works great! thanks so much...

    also the additional info you included is helpful for other things we are doing with the CD - one more question if you don't mind....

    we would like to link a few buttons to PDFs that will be housed on the CD - my research has given me this to try, but again I can't get it to work...

    getURL("fscommand:exec", "documentName.pdf")


    i will include a copy of Actobat Reader on the CD and house it in the same folder as my PDF document - for now I'm just trying to get it to work on my machine


    thoughts?

  6. #6
    This, getURL("fscommand:exec", "documentName.pdf") will not work in the flash player. As you can see, it will only run EXE files... There is a way around this though, several actually.

    1. You could write a bat file and an apple script file (if for PC and MAC OS's) and have it launch the Acrobat Reader, and then load the PDF file.

    2. Write a program for PC and or MAC that will launch the Acrobat Player, and the loaded PDF.

    Again, you can not lauch a FILE from the flash player, only an application, and then have the application load a file, via a script or an 3rd party application on the CD you have.

    So, you could have the flash player install the acrobat program, but not open a pdf with out a script or 3rd party application.

  7. #7
    Junior Member
    Join Date
    Jul 2002
    Posts
    5
    I hate to keep taking up all your time...but you definitely seem to know what you are talking about...so a big THANK YOU.

    I have tried just opening up an application (thinking that the Flash player wasn't going to open the file), but this didn't work either.

    this was the code I used:

    getURL("fscommand:exec", "AdobeAcrobat");


    I placed a copy of Acrobat in the folder with the Flash player, and the SWF file - also I made sure the name was exact (no spaces). this still didn't work for me.

    Also, I'm doing this on a Mac....although I do have a PC here if needed (but haven't tried that route yet).

    ???

  8. #8
    Ok, lets do this... Joe B from adobe had this to say in a post on adobes u2u forum.


    joe post

    Make sure that:

    The executable is in a folder at the same level as the projector file

    Don't specify the path to the executable, just use getURL("fscommand:exec", "executableName");

    Make sure it's a projector, and not just a SWF file that is sending the fscommand

    Do all that, and it should work...

    Hope it helps,

    -Joe


    Does this help at all?

  9. #9
    Junior Member
    Join Date
    Jul 2002
    Posts
    5

    ahhh...yes. the projector was the problem.
    you guys rock.

    thanks!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center