A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: flash 5 scripting

  1. #1
    Junior Member
    Join Date
    Apr 2001
    Posts
    2

    scripting in flash 5

    i have a question about scripting in flash 5

    can you send me a tutorial on how to write a script that will make flash recognize whether a specific key has been pressed and depending on how many keys are pressed will determine what animation loads.

    for example the flash movie has a backgrouond image of seven rectangles stacked on top of each other (the image is one layer), there are 39 different animations (each animation is on it's own scene plus the background layer) that can be loaded in any order between rectangles 1 to 6.

    animations 2 to 39 can not be loaded in rectangle 7 the only animation that can be loaded is animation 1. when an animation is loaded by pressing the key that represents that animation, flash will determine how many keys have been pressed before.

    e.g. if a key has been pressed once and the next key that is pressed, is the key that represents animation 2 flash will load animation 2-2 (because there are six different versions of each animation except animation 1).

    when the third key is pressed, flash loads the third version of the animation that the third key represents and so-on to the sixth key presssed. for the seventh rectangle the only animation that can be loaded is by pressing key 1.

    please respond asap
    [Edited by eaw80 on 04-11-2001 at 12:08 AM]

  2. #2
    Junior Member
    Join Date
    Apr 2001
    Posts
    24
    use key.getCode to capture each key that is pressed and store it in an array, it will store the key code of the key pressed so just make sure to associate your images with certain keycodes... I don't quite understand what you're doing but it seems like that should work?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center