3 Replies Latest reply on Jul 31, 2007 6:55 AM by Gorka Ludlow

    Controlling components attached within a Movieclip

      I have a custom compoents that works really great, when I tested it it had no errors and all getters/setters worked just fine.
      the problem was when I created a movie in the library, then attached an instance of my component to it, after then I just ran a loop through which the movie containing my component was attached to the stage.

      I tried to access the preoperties of the components, but it didn't work, I retried but using the button component with the same practice, and the surprise was I couldn't control it eithre!! I couldn't change the label!!!

      What the heavens is goinig on? I debugged the whole scene and the only noticeable thing is that the compiled code into the event on(construct) just sends empty attributes!!

      I wish if there is some solution to this.


        • 1. Re: Controlling components attached within a Movieclip
          Gorka Ludlow Level 1
          Try this in the components properties panel:
          select both export in first frame and export for actionscirpt.

          1 person found this helpful
          • 2. Controlling components attached within a Movieclip
            Hi- I'm talking about getting control over a movie that has a component within it, that is, the problem isn't with the properties panel, rather it is getting into a component that is not in the current timeline.

            forget about about my component, this seems to be a problem with the Flash Compoenets in general, you can't control them!

            consider the following:
            - myMC is in the library and-indeed- has a proper export settings set .(linkage identifier is mc )
            - this movie has a Button component instance named btn
            - in the main timeline suppose we have:

            ///---- below Code doesn't work!
            eval("mc").btn.label="Hi !";

            got my point? I need an explanation of this.. when debugged the whole thing there seems an empty initialisation when the on(construct ) is initiated.
            thx. anyway
            • 3. Re: Controlling components attached within a Movieclip
              Gorka Ludlow Level 1
              Try this:

              var MC:MovieClip = attachMovie("mc","mc",1);

              MC.btn.label="Hi !";