7 Replies Latest reply on Jan 19, 2009 10:15 AM by kglad

    Applying to all instances of a Class

      Hi all. My question is a simple one.
      I have a class:

      class Test extends MovieClip
      static var hexColor:Number = 0x000000;

      var box:MovieClip;

      function Test()

      function init():Void
      var colorObj:Object = new Color(this.box);

      And the library item is registered to this class and contains a MovieClip inside it with the instance name "box". The default color of the box is green, and is being changed to black as seen in the static variable.

      Now I have 3 instances of Test class's symbol: test1, test2 and test3.
      I would like to set (for example):
      Test.hexColor = 0xFFFFFF

      I would like to apply this new color tho all instances of the Test class.
      Going through the whole _root MovieClip is not an option since "Test" class symbols will be placed inside other MovieClips.

      Can anyone offer a solution?
      Thank you in advance!