A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Using Variable Name to Target Movie Clip

  1. #1
    Junior Member
    Join Date
    Dec 2006
    Posts
    17

    Using Variable Name to Target Movie Clip

    I want to target different movie clips depending on the name of a variable (puzNum below). Basically, by incrementing i, I want to target movie clips "movie.scene0" through "movie.scene31".

    var puz = new Array();
    for (i = 0; i < 32; i++){
    puz[i] = "movie.scene" + i;
    }

    var puzNum = puz[i];
    puzNum._alpha -=10;

    Any help is appreciated.
    Last edited by TheTigerHobbes; 01-16-2008 at 11:53 PM.

  2. #2
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,834
    to target a movieclip like that you need something like: movie["scene"+i]
    .

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