Welcome, Guest
  • Author Topic: variables naming  (Read 749 times)

    Algreco

    • Seasoned Programmer
    • ***
    • Posts: 123
    • If it 'aint workin blame Flash!
      • View Profile
      • Line Dezine
      • Email
    variables naming
    « on: 08/09/04, 07:54 »
    Hey Guys,

    I am trying to name a variable and turn it in that way to the instence name inside a nested movie clip.... hmm....
    var image_arr = new Array("1.jpg", "2.jpg", "3.jpg","4.jpg","5.jpg","6.jpg","7.jpg");
    var top_image_num = image_arr.length;
    var i = 1;
    var top_image_holder_num = top_image_num - i;
    trace (top_image_holder_num);// no problem here :)
    var Num = "holder"+top_image_holder_num;
    trace (Num);//no problem here either! it gives "holder6"

    NOW... this works:
    this.ImageNew.holder6.swapDepths (3);
    But this doesn't!:
    this.ImageNew.Num.swapDepths (3);

    Pls HeLp   :-\

    Mattias Robo

    • Moderator
    • Systems Administrator
    • *****
    • Posts: 555
      • View Profile
      • nook
    Re:variables naming
    « Reply #1 on: 08/09/04, 14:27 »

    Say eval(Num).
         "I've figured it out. It's not the fords... it's what's IN them!.."