Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using buttons to change graphics.

Status
Not open for further replies.

jjj4

Technical User
Aug 4, 2004
2
CA
Hello,

In my Flash I have a picture of an arcade machine, with a left hand on the joystick and the right hand on one of the buttons.

I have 5 different pics with a hand holding the joystick in the various states (left,right,up,down,none). I want it so when I hit the arrow left key the graphic changes to the picture I have of the joystick being pushed left, the right arrow key to show the pic I have of the joystick being pushed right, ect. Also, once the key has released I want the none state to come back.

As the hands move the joystick, it will be used for navigation on the arcade screen as well.

I have created a button and have used the keyboard input, but I need help when it comes to using the keys to switch jpgs on screen.

Any help would be most appreciated,
j
 
Make an MC for the joystick, and assign the different states as standalone buttons. Then you can assign an action on the buttons in every direction.

For the none state you can enter actionscript to move to a beginning frame where the picture resides.

hope this helps,

d2c
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top