Welcome, Guest. Please login or register.
Did you miss your activation email?
31 Jul 2010, 11:36:23 UTC
Forum home
+  flexdeveloper.eu Forum
|-+  Flex and ActionScript 3.0
| |-+  ActionScript 3.0 (Moderators: JMWhittaker, Jan K, thewarpedcoder, James)
| | |-+  attach movieclip to keypress
« previous next »
Pages: [1] Print
Author Topic: attach movieclip to keypress (Read 457 times)
danblukk
Newbie FD
*
Posts: 9


« on: 09 Feb 2010, 01:35:52 UTC »

I'm pretty new to action script

I'm trying to create a simple platform game and decided to use movie clips for each move ment.

I created a movie clip for the character jump called jump_mc and want to simply attach it to the UP keypress so it plays and removes everytime i press up on the keyboard. I've scoured the net but can only find movie clips attached to buttons.

can anybody help with some example code?
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #1 on: 09 Feb 2010, 09:20:15 UTC »

So each time the user presses the UP arrow key, you want a movieclip to be attached from the library, played, and the removed when complete?

What do you want to happen when the user presses the key repeatedly before the first movieclip has finished playing?
Logged

danblukk
Newbie FD
*
Posts: 9


« Reply #2 on: 09 Feb 2010, 18:10:36 UTC »

So each time the user presses the UP arrow key, you want a movieclip to be attached from the library, played, and the removed when complete?

What do you want to happen when the user presses the key repeatedly before the first movieclip has finished playing?

well in mid jump. I would like it not to be able to jump again until it has landed. Pretty much the original super mario on the nes. Not too concerned about the power of the button press though for jumping higher and lower.
Logged
Pages: [1] Print
« previous next »
Share this on: Twitter Twitter Del.icio.us del.icio.us Digg Digg
Jump to:

©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC