A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Display Character from List on the Stage?

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    21

    Thumbs up Display Character from List on the Stage?

    I would like to display a single character from a list of possible characters on the stage.

    I would like Flash to randomly choose one character from the list to display.

    I'm totally new to AS so am not sure where to start with this.

    It would be something like this:

    display one character from this list:
    a
    b
    c
    d

    I would then like to duplicate this so that is happens about 10 times on the stage. This would result in about 10 letters/characters being displayed on the stage from the list.

    Any help much appreciated.

    Thanks.

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    If you are totally new to AS, I recommend you to go to some tutorials or buy a book first.

    To give you a hint to your question, you create an Array or Vector with those objects and then use Math.random(). However, there are a number of points you have not explained here. What kind of list do you mean? Are these characters all different Movieclips in the library? The duplication question is a completely new question. So in one thread please ask only one question.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    21
    Thanks for the reply (again)!

    I've since been working through the Lynda.com AS videos and have learned a little more since I posted.

    I would like to have 8 (for example) objects (movie clips) in the library.

    On an event, mouse or frame enter (for example), 4 of those objects from the library are displayed on the screen, chosen at random.

    So it would be:
    On frame enter, choose 4 movie clips from a list of 8 and make them visible on the stage.

    Thanks!

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