AS3 - using arrow keys - next prev frames applied in a number of frameworks

Hi, I'm still new to coding - as3 in flash

I want to be able to use the arrow keys left and right

go to next and previous to the main timeline - frames

to the keyframe 23, when the user presses the left arrow button (previous).

go to keyframe 86.

Similarly,.

to the keyframe 86, when the user presses the right arrow (next).

go to the key 23.

It's just a simple gallery with each image on a keyframe.

but wished that the arrow keys to work solely from keyframe 23-86.

I used this code for now to get by using the arrow keys:

stage.addEventListener (KeyboardEvent.KEY_DOWN, keyDownListener);

function keyDownListener(e:KeyboardEvent) {}

If (e.keyCode == Keyboard.RIGHT) {}

nextFrame();

}

If (e.keyCode == Keyboard.LEFT) {}

prevFrame();

}

BUT cannot get the closure of 23 to 86 (left) and 86 to 23 (right)

When using if statements.

Any help will be super duper enjoyed!

Thanks in advance

function keyDownListener(e:KeyboardEvent)

{

If (this.currentFrame > = 23 & this.currentFrame)<=>

{

If (e.keyCode is Keyboard.RIGHT)

{

If (this.currentFrame! = 86)

{

nextFrame();

}

on the other

{

this.gotoAndStop (23);

}

}

If (e.keyCode is Keyboard.LEFT)

{

If (this.currentFrame! = 23)

{

prevFrame();

}

on the other

{

this.gotoAndStop (86);

}

}

}

}

Tags: Adobe Animate

Similar Questions

  • Re: Cannot use arrow keys when playing flash games

    Someone had this problem? The arrow keys on my keyboard do not work when I play flash games. Have downloaded the latest version of adobe, but not luck. Is it sounds like a hardware problem? What is the best way to thing to work around this problem?

    Thanks for any response.

    Post edited by: terrypal

    For me it has nothing to do with a malfunction of the equipment. If you can use the arrow keys in Windows or any application there absolutely no problem with the keyboard or something similar.

    Maybe is this result of the issue of the restriction of game control.

  • Using arrow keys to navigate through the presentation

    Hi all

    I converted a powerpoint presentation using adobe captivate and uploaded to LMS. My question is how can I use the arrow keys on my keyboard to navigate through the presentation.

    Thank you in advance.

    Hello Yanno,

    You can try to associate the arrow key as shortcut for the click box that would appear on the slide if you imported the TPP with the slider forward as a click of the mouse.

    Thank you

    Vish

  • Can't get ADE to accept the ID and the password used on computer mobile Prev crashed! tried a number of times

    Abobe please help me to register my email Add. ID and password! havde tried to be accepted so many times without success.

    These are mainly the user forums to with some frequent attention by useful Adobe employees.  Ask if adobe will help here is a bit like flipping a coin--sometimes they could be around and offer trying to help and sometimes you get just another user like me trying to help.

    How I can try to help is to provide you with the means to try to communicate directly with the Support from Adobe.  If they can help you is what you will find if all goes well in a positive result.

    Here are some links to help get in touch:

    Chat: http://www.adobe.com/support/chat/ivrchat.html

    Phone: http://www.adobe.com/support/download-install/supportinfo/

  • Artifacts when moving object with the help of the arrow keys.

    Hi all

    hope this is the right place to post this question.

    I want to write simple arkanoid game in Flash (AC3). I managed to write code that moves my paddle with the arrow keys. The code looks like this:

    function OnNewFrame(event:Event):void
    { 
        if (input.IsLeftHeld)
        {
            if (paddle.x > 0)
            {
                paddle.x -= 10;
            }
        }
        else
        if (input.IsRightHeld)
        {
            if (paddle.x < stage.stageWidth - paddle.width)
            {
                paddle.x += 10;
            }
        }
    }
    

    It works, but the result is ugly. The animation is not smooth, there are moments when the paddle stops for a moment. Also when the speed of translation is high (this is 10) you can see that paddle flashes at the ends, it resembles the unique problem of buffering. You can see both of these effects here: http://www.flash-game-design.com/flash-tutorials/movOb.html , identified flicker is less visible due to the amount of small translation.

    How to solve this problem? How can I enable double buffering (or maybe it is enabled by default)?  Any help will be appreciated.

    PS Sorry for the bad English

    Hello! I think you went backwards... First - in order to achieve the best visual transitions - you will not use travel speed at all. Second - you must pay attention to the establishment of the frame rate of the Flash document. Vivid games usually run at 60 frames per second. So I made a sample for you. Try it, it: http://cdn.dmldevelopment.com/plugins/tests/paddle/paddle.html . You can use arrow keys plus a key space to see how smooth the transition is. And you can download the source code here: https://rapidshare.com/files/3779443821/paddle.zip . Please let me know if I helped you. See you soon!

  • Arrow keys without impact on the spiral in the development

    Hello

    I paint a spiral and when I try to use the arrow keys up and down to influence the number of rotations (decay), it doesn't do anything to influence my spiral. Any ideas?

    I use Illustrator CS5 on MacBook Pro OS 10.6.8

    Thank you!

    D.

    Option, click on the work plan while using the spiral tool, change something small such as 5 segments.

    If you had a large quantity of segments and small spirla, the segmetn stopped to shoot.

  • How can I move precisely image in the monitor by using the arrow keys?

    I am currently using first 13 items on my desktop Windows 10. When I use the special effects of culture, I am able to precisely position the top, down, left and right limiters by typing in a decimal percentages. It works very well, especially when you try to manually move the limiter in the monitor by holding down the left mouse button and dragging. Enter the percentage allows the adjustment takes place easily.

    However, I was unable to find a similar positioning tool for when I want to move the image in the monitor. The only way I know to move the image currently is holding down the left mouse button and dragging the image. What would be the most direct and intuitive way (for me) to precisely move the image, once you left mouse clicked on the clip to show the white frame with its 8 small white squares, simply hold the CTRL key, and then use the 4 arrows to position the image. However, holding the CTRL key and pressing the keys 4 arrow do not work, or not keeping the Alt key and pressing the key 4 arrow, nor does not hold down Shift Ctrl, shift, or Ctrl Alt Shift For me, it would help greatly to a precise positioning, if I could hold the CTRL key and press the arrow key should be.

    Anyone happen to know how to position an image in the monitor otherwise than by holding down the left mouse button and dragging the image where you want?

    Thank you

    With the clip selected on your calendar, click effects applied on the right side of the interface.

    In the effects Panel, open the path properties. Here you can define the Position and the scale and Rotation of your clip. You can also effects and keyframe animated trajectories.

  • development module when I change something with correction of the area I can't move to the next image with the right arrow key

    Hello

    I work with the module development and when I change something with correction of the area I can't move to the next image with the right arrow.

    Is there a solution?

    Norbert

    I think that Yes you are talking about "Spot healing.

    So once you have used the tool, please click "Fertig" at the bottom right of the image.

    Try, and then use the arrow keys.

  • I can't scroll my podcasts more since the update to iTunes 12.4. I can only use the arrow keys to go through my podcasts, and then take it all down.

    I have a MacBook Pro and update to the latest iOS and iTunes. I can't scroll in my podcasts to choose which episodes to synchronize. I can only use the arrow keys to navigate, but then while he list of podcasts on the left, it moves also down from the bar on the list of episodes, so by the time I spend the first 7 or 8 I can't see the episodes more to choose which to add/remove.

    Same here, very frustrating.

    I found if you go in your library > Podcast, then control click on the podcast, you can select Add to the device, which works, but is in no way acceptable.

  • Firefox is a cursor in the window html pages that can be changed to spoil the option to scroll using the arrow keys

    Whenever I click in a window to scroll through my arrows is put a cursor in the window and scrolling out of it, instead of scrolling the entire page using the arrow key it scrolls by the location of the cursor within the window as a word document.

    Press F7 to disable the keyboard navigation.

    http://KB.mozillazine.org/accessibility.browsewithcaret

  • When I use the arrow keys in firefox to go forward and back, the cursor erases tiny pieces of letters.

    Even within this field of text that I type, everything is normal, but a back using the arrow keys (and then spacing also forward using the arrow keys as I go back to typing) deletes chunks of the text. Once I have started typing again in this area, the components are deleted to normal. This effect can be captured in a screenshot. After inspection, it seems to be a second invisible cursor, a character to the right of the cursor visible. So when the back arrow back, the invisible cursor trails that visible, destroying the text behind. When the spacing before using the arrow keys, the text gets fact sinking in front of the cursor visible.

    Try turning off hardware acceleration.

    • Tools > Options > advanced > General > Browsing: "use hardware acceleration when available.

    If disable hardware acceleration works then check if there is an update available for your graphics display driver.

  • Why can I not use the arrow keys to scroll up and down Web sites more?

    When I'm on a Web site and I click anywhere on the Web site there is a flashing bar - sorry, don't know the technical term - you would find in a new document on hold for the next character to appear to the left of it. It's almost as if FF - not the Super-team - want to add me to test any page I find, but it's just a weird error.

    I assume it's because of this glitch (assuming) that when I go to press the up or down arrow keys it no longer cascades the screen smoothly like a parade of content; instead it just hops from top to middle to bottom and that's when it does anything. What gives?
    

    That behavior is characteristic for the active Keyboard Navigation . Press the F7 key, only once, and then test to see if things return to normal. The F7 key is a key off voltage for the keyboard navigation: http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works

  • Try to use my arrow keys to go to an icon on my desktop, and all I get is nothing.

    I am running xp pro and it works on a dell computer. whenever I try to use my arrows to go to an icon on my desktop all I get is nothing.

    now I can use my mouse and click on them and then get the arrow keys to work but not the origin of the proscess.

    But as I said, if I just click on one icon click and turn it on, then I can move around the office with my arrows.

    I can also bring up the start menu and the arrow keys are working on it? Yes it is strange... but if I close the menu then the arrow keys won't work

    on the items on the desktop. Window Eyes 7.5 also used as my screen reader as well. I turned it off and it makes no difference.

    It's driving me crazy! Connect to a blindman please!

    OK, here's a stupid question for you guys. I can not get my office works > what should a blind man?

    Hello

    • What were the changes made before the issue started?

    I suggest you to refer to this method:

    Method:

    I suggest you to check the safe mode issue.

    Here is the link:

    http://support.Microsoft.com/kb/315222

    If it works in safe mode, I would say lets you perform the cleanup start and check.

    http://support.Microsoft.com/kb/310353

    Note:

    How to configure Windows to use a Normal startup state

    After you have used the boot is a way to solve your problem, you can follow these steps to configure Windows XP to start normally.

    1. Click Startand then click run.
    2. Type msconfig and click OK.
      The System Configuration utility dialog box appears.
    3. Click the general tab, click Normal Startup - load all device drivers and services, and then click OK.
    4. When you are prompted, click restart to restart the computer.
  • When I restart and press f8 to go into safe mode, I can't scroll to the top I use the arrow keys, but she will not go up

    It shows the possibility to go in safe mode, but I can not just ride to select

    Try using the arrow keys on the numeric keypad (key '2' and '8'), but for those to work, your "Num Lock" must be disabled.  (Press the NumLock key, until the light Verr off Num).

    If this does not work and you are able to boot into normal mode, you can configure so that it starts in safe mode using "msconfig":
    Start-> Run-> "msconfig".
    Start msconfig, click on:
    Win.ini (tab)-> and then place a check mark in front of "/ SAFEBOOT"-> click on 'OK '.
    Restart your computer.
    He will then start safe mode.

    HTH,
    JW

  • Print layout on screen rotation when you use the arrow keys

    I must have accidentally pressed a wrong key combination.  Now, when I use the arrow keys on the keyboard while typing of text, orientation changes screen, according to which key I hit it, I hit the down arrow, the text on the printed page rotates 180 degrees.

    How can I fix it?

    Biggar Gordon

    Houston, Texas

    Thanks for your reply.

    I googled the question of fun and learned you can hit CTRL + Alt + an arrow key to change the direction of the display on the monitor.  Pressing on the same new keys cancels the function.  I must have accidentally done to create the mess in the first place.

    I've done the same thing if I had rebooted the system.

    Thank you very much!

    Biggar Gordon

Maybe you are looking for

  • QuickTime Player cannot be opened because of a problem (macOS Sierra).

    I've recently upgraded to Mac OS on my MacBook Pro (mid-2012) and QuickTime Sierra stop working! I can't understand how to solve this problem. Instead, it gives me a screen that says: QuickTime Player cannot be opened because of a problem. Check with

  • Could someone help me get my Hosts file work?

    Hello I hope someone can help me restore my Hosts file for me. I tried to update it and one thing led to another, and now I have nothing. See attachment. Anne

  • failure of AFP in OSX 10.11.2

    I use a MacMini Server OSX (version 5.0.15) providing services of time machine backup to himself and two other MacBook Pro laptop computers running 10.11.2 and 10.10.X. Immediately after a server routine upgrade to 10.11.2, 10.11.1 AFP services seem

  • constant random error message "does not:

    weather it's IE, MSN browsers or use of files or download programs have run sys file check and results are no problem, how can I solve this problem

  • driver xp for hp pavilion p6159es

    I had to install xp in a Hp pavilion p6159es, however, I did not find the drivers on the Web site. Is it possible to get these drivers? Thank you