Question:

Actionscript Question

by  |  earlier

0 LIKES UnLike

I need a bit of code that while you press the down key, it goes to the next frame and stops when you let go.

 Tags:

   Report

2 ANSWERS


  1. Flash CS3 - AS3 version

    stop();

    stage.addEventListener( KeyboardEvent . KEY_DOWN, EventHandler);

    function EventHandler(e : KeyboardEvent) : void {

    if (e. keyCode == 40 ) {

    nextFrame () ;

    }

    }

    Anil

    anilkumarnd@gmail.com


  2. put the following into your movieclip

    onClipEvent(enterFrame){

       if( key.getCode()==40){ mc.nextFrame( );} //40 is downArrow

    }
You're reading: Actionscript Question

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.