4 Replies Latest reply on Oct 6, 2009 9:30 PM by DraconianDevil

    cannot access text in movieClip

    Tal770 Level 1

      1. I created empty symble with instance name "picture" and placed it on stage at a wanted position.

      2. if the image is aviliable I load the movie   picture.loadMovie(image[p]); to show the image

      3. if image isnt avliable I want to attach a movieClip that has dynamicText so I can change the text.


      this doesnt work - the movieclip is not shown and picture._alpha has no effect

      so I tried to load a swf file of this movieclip (this isnt the right way)


      it works and picture._alpha has effect

      list veriables shows:

      Movie Clip: Target="_level0.picture"
      Variable _level0.picture.onRelease = [function 'onRelease']
      Movie Clip: Target="_level0.picture.instance9"
      Edit Text: Target="_level0.picture.instance9.m_text"
          variable = null,
          text = "default text", etc...


      but I cannot access the text.

      I preffer to use attachMovie and change its text


      mcDef.swf is made of rectanglar shape, on top of it dynamicText with instance name m_text

      this was converted to a symble with linkage name mcDef -  nothing spacial

      plz can any body help on this!!!

        • 1. Re: cannot access text in movieClip
          Tal770 Level 1

          I'm using flash MX2004 pro


          • 2. Re: cannot access text in movieClip
            Ned Murphy Adobe Community Professional & MVP

            If mcDef is the actual linkage ID and not some String variable representation of it, you need to specify it in quotes?




            When you used loadMovie, how did you try accessing the textfield?  I don't see any code attempting that?

            • 3. Re: cannot access text in movieClip
              Tal770 Level 1

              you are right

              i wrote picture.attachMovie(mcDef,"mcDef0",1000);

              were it should be picture.attachMovie("mcDef","mcDef0",1000);

              10X for a quick answer

              • 4. Re: cannot access text in movieClip

                I remember having this problem once before! I was creating a Movie Clip with an animation, and i thought I could change the text dynamically. however, it dint work out that way.


                Finally, after a lot of trial and error methods, and precious 12 hours, I came to conclude to a method which finally worked.

                had to convert the text to a movie clip.


                You have to declare a Variable in the very first frame inside the movie clip, like:


                var txt:String;


                and then, when you place the movie clip on stage, write this code for the movie clip:


                onClipEvent (load) {

                this.txt = "Home";



                Also, you have to convert the dynamic text to a Movie clip! and then place this code for that text movie clip:



                this.mytxt.text= _parent.txt;



                Here, mytxt is the instance name of the dynamic text.. hope you understand this...