A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [CS3] [AS2] When Enter Button is Pressed, Flash goes to next frame..how to stop this?

  1. #1
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365

    [CS3] [AS2] When Enter Button is Pressed, Flash goes to next frame..how to stop this?

    Hi. I'm making a Flash movie that, at one point, uses PHP to send emails. It is on it's own frame, so when users press the enter button while the email is being sent, it skips to the next frame and doesn't send the email. Any way to stop Flash Player from advancing the frame when the enter button is pressed without using JavaScript?

    Thanks,
    Sportzguy933

  2. #2
    Junior Member
    Join Date
    Jul 2008
    Posts
    3
    I have one thought, though I am not certain it'll work.

    Try adding some code that checks to see if the enter button is pressed, and if so, then go to the current frame. It may look something like this (forgive me, my syntax may not be correct...I'm used to C and other languages, and haven't fiddled around with Actionscript in a long time.)

    if (Key.isDown(key_ENTER)) {
    GotoAndStop(current frame);
    }

  3. #3
    Senior Member vinayak.kadam's Avatar
    Join Date
    Oct 2006
    Location
    gotoAndPlay("Pune");
    Posts
    831
    this would happen only at authoring time. Please test the SWF individually, this wont happen. You can neglect this thing.
    As ever,
    Vinayak Kadam

  4. #4
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    Thanks vinayak and ultimate dash for the responses! I think vinayak is correct, it was only happening because I was testing the SWF.

    Thanks,
    Sportzguy933

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