3 Replies Latest reply on Apr 19, 2006 2:58 AM by blemmo

    Class Discussion (AS 2.0)

    Marghoob Suleman Level 1
      How to access the stage movieClip objects from the class?
      I want to set the text value of a textBox called 'myLable_txt' from the class file.
      Please help.
        • 1. Re: Class Discussion (AS 2.0)
          you have not mentioned where your class is and how the object of it is created.
          from whereever, its as simple as you would access your root from an internal/nested timeline... jus use the following code in your class to set the value of the desired textfield

          _root.myLable_txt.text = "the text value";

          good luck!

          • 2. Re: Class Discussion (AS 2.0)
            Marghoob Suleman Level 1
            Hi v2moorthy...
            thank you... we can use like this. is there any another way to use. What if this swf would be loaded by some other swf.
            i've "A.swf" where i've created an object like 'myLable_txt' and "A.swf " could be inside of N number of parent SWF then. what is the best idea.

            abc.swf // loadMovie("123.swf")
            » 123.swf // loadMovie("A.swf ")
            »» A.swf

            Thanks for your time.
            • 3. Re: Class Discussion (AS 2.0)
              blemmo Level 1
              If the class object is contained in A.swf, you could try this._parent to access the root timeline of A.swf. If there are more MCs contained in A.swf, add _parent for each MC. To see if the path is right you can use trace(this._parent) inside your class and see where that ends up in the output window.