A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: EMERGENCY! Dynamic Code

  1. #1
    Senior Member
    Join Date
    May 2002
    Posts
    359

    EMERGENCY! Dynamic Code

    hi there everyone,

    ive got a quick question,

    i have 4 movie clips each named:

    moleTop1
    moleTop2
    moleTop3
    moleTop4

    im trying to run one at a time using this code but with no luck:

    Code:
    var rndNum:Number = 4;
    
    moleTop['rndNum'].play();
    i know its possible but ive forgotten the syntax

    any ideas? im using AS3

    Cheers
    FlashX

    ________________________
    The mind lies, it only hears what it wants to hear.

  2. #2
    Moderator enpstudios's Avatar
    Join Date
    Jun 2001
    Location
    Tampa, Fl.
    Posts
    11,282
    Are you trying to get each movie clip to play in random order?

  3. #3
    Senior Member
    Join Date
    May 2002
    Posts
    359
    Thanks for your reply,

    I think I found it,


    This["moleTop"+rndNum].play

    ... Now all I need to do is try it out lol
    FlashX

    ________________________
    The mind lies, it only hears what it wants to hear.

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