Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6799141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:48:47+00:00 2026-05-26T18:48:47+00:00

Ok, so I am creating a slideshow presentation in Flash CS5. The code is

  • 0

Ok, so I am creating a slideshow presentation in Flash CS5. The code is very basic, however it does not work as intended. It’s supposed to go to the next frame if i press a button, or press up/right arrow on the keyboard. However, the keyboard only works after I’ve pressed a button once.

my code:

import flash.events.MouseEvent;
import flash.events.KeyboardEvent;

slides.stop();

addEventListener(KeyboardEvent.KEY_DOWN, keyD);
FB.addEventListener(MouseEvent.CLICK, nextSld);
BB.addEventListener(MouseEvent.CLICK, prevSld);

function keyD(evt){
    var k = evt.keyCode;
    if(k==37||k==38){ 
        prevSld(evt);
    }
    if(k==39||k==40){ 
        nextSld(evt);
    }
}
function nextSld(evt){
    slides.nextFrame();
    }
function prevSld(evt){
    slides.prevFrame(); 
}

slides is a movieclip, where I’ve stored all my slides (Oh, by the way, I know my setup isn’t the best, but I wouldn’t use a lot of time on it, as it’s for a religion class). FB is forward button, and you can guess what BB is…

Now, I would just make sure my problem isn’t here, and maybe someone can point out the problem, even though this probably don’t fit on this board.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:48:48+00:00Added an answer on May 26, 2026 at 6:48 pm

    change addEventListener(KeyboardEvent.KEY_DOWN, keyD); to stage.addEventListener(KeyboardEvent.KEY_DOWN, keyD);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a simple slideshow for my sister using Flash CS5 AS3. I'm using
Creating a simple public/private keypair, such as through ssh-keygen does not create a file
Creating a slideshow jQuery plugin, but having trouble getting it to work with more
Creating a patch is very easy in SubVersion, With Tortoise, you right-click and select
I am creating a slideshow of animations using animated GIFs. I'm crossfading from one
Creating extensions got much easier with Vs2010, but this seems not to be the
Creating a Lisp syntax like DSL - very small specific application - but very
I'm creating a slideshow using javascript that fades images. Awhile back, I discovered that
I am very new to rails development. I am creating a simple backend for
Creating a website using simple html(not html5) and css but got stock in mouseover

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.