A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: variable path name --> path=_root

  1. #1
    Senior Member alex8735's Avatar
    Join Date
    May 2001
    Location
    Aachen, Germany
    Posts
    117

    variable path name --> path=_root


    instName="inst1";
    path="_root";

    Element.prototype.setVisible = function(){
    [path+"."+instName]._visible=true;
    }


    I am trying to build a variable path to an instance. Normally I would do something like this[var]._x, but this doesn't work with _root.

    Any ideas?
    alex8735 from Germany ICQ:61424424

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    try this:

    eval([path+"."+instName])._visible=true;
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Senior Member alex8735's Avatar
    Join Date
    May 2001
    Location
    Aachen, Germany
    Posts
    117
    that was quick answer, thanks;-)
    alex8735 from Germany ICQ:61424424

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Bitteschoen!

    Jochen aus Dortmund (ist schon lange her)
    - The right of the People to create Flash movies shall not be infringed. -

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