Quantcast
Channel: Adobe Community : All Content - Adobe Animate CC - General
Viewing all articles
Browse latest Browse all 13519

Flash using arrow keys to move between frames in an animation

$
0
0

Hi,

Im currently creating a calculator on flash and I would like to be able to move to the next part of the calculator (the next frame) by using the arrow keys on my keyboard

This is my current code to move between the frames using a buttons.

 

stop();

 

 

var input1:String;

var input2:String;

var Res:Number;

var Quote:Number;

 

txtLen.restrict = "0-9"

txtWid.restrict = "0-9"

 

 

BtnCon2.addEventListener(MouseEvent.CLICK,fnCall)

 

 

function fnCall(Event:MouseEvent):void{

 

  input1 = txtLen.text;

  input2 = txtWid.text;

  Res = parseInt(input1) * parseInt(input2);

  Res.toString();

  gotoAndPlay(21)

  txtArea.text = String(Res);

 

}

 

 

BtnRes1.addEventListener(MouseEvent.CLICK,fnRes1)

 

 

function fnRes1(Event:MouseEvent):void{

  gotoAndPlay(1);

 

Im trying to do the same thing that im doing with my buttons but with my arrow keys

 

Thanks


Viewing all articles
Browse latest Browse all 13519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>