dynamic path finder in Flash MX

  • Started
  • Last post
  • 1 Response
  • AOC

    Ok, so here's the scenario:

    I have buttons and movieclips scattered throughout my flash mx movie that all have 1 of 5 different backgrounds. each of the 5 backgrounds are movieclips with a certain instance name. For instance all the buttons throughout have a "bttn_bg_up","bttn_bg_over", and btnn_bg_down" background for any one of the corresponding states. my question is this: without traversing each and every level/movieclip, is there some way to find the given instance name anywhere so that i can globally set its value?

    I am trying to make this dynamic as possible, so putting each path for every object with a given instance name would not be the most efficient way of handling this (as per adding more objects would add to the list of instance names to set). I also DO NOT want to traverse the entire set of objects within the whole flash movie b/c that would take forever for the user to wait.

    If ANYONE can give ma any incite, i'd appreciate it super-much.

    Thanks in advance.
    AOC

  • autonoma0

    To make an instane name global, place this on the root timeline:

    _global.gBackground1 = _root.movieClip1.movieClip2.back...

    Then you can use 'gBackground1' to call that MC from anywhere.