5 Replies Latest reply on Aug 26, 2006 10:10 AM by aviles-drc

    dynamic text - defined in action script

    aviles-drc
      I have inherited a .fla file which has a movie containing the actionscript below (see attached code). I have used the debugger to locate the path of a movie that is being created dynamically. I have also used the Movie Explorer to search all the possible variables and can not find where the actual text (that I'm seeing in the final flash) is defined/assigned.

      Ironically, when I open the .fla file with a text editor I can see the following types of assignments scattered throughout but I am not able it locate these action scripts in any of the objects in the .fla:

      ...
      onClipEvent(load) {
      this.text=" Leaf Photos"
      }
      ...
      onClipEvent(load) {
      this.text="Flowers Photos"
      }
      ...

      Does anyone know how I can search the .fla to find and reassign these values? Is it possible for there to be an embedded object that I can not edit? Could the values be coming from an external file even though I only have the one .fla and it's working without error when I publish?

      Gabriel
        • 1. Re: dynamic text - defined in action script
          Level 7

          "aviles-drc" <webforumsuser@macromedia.com> wrote in message
          news:eckdql$b8s$1@forums.macromedia.com...
          >I have inherited a .fla file which has a movie containing the actionscript
          > below (see attached code). I have used the debugger to locate the path of
          > a
          > movie that is being created dynamically. I have also used the Movie
          > Explorer
          > to search all the possible variables and can not find where the actual
          > text
          > (that I'm seeing in the final flash) is defined/assigned.
          >
          > Ironically, when I open the .fla file with a text editor I can see the
          > following types of assignments scattered throughout but I am not able it
          > locate
          > these action scripts in any of the objects in the .fla:
          >
          > ...
          > onClipEvent(load) {
          > this.text=" Leaf Photos"
          > }
          > ...
          > onClipEvent(load) {
          > this.text="Flowers Photos"
          > }
          > ...
          >
          > Does anyone know how I can search the .fla to find and reassign these
          > values?
          > Is it possible for there to be an embedded object that I can not edit?
          > Could
          > the values be coming from an external file even though I only have the one
          > .fla
          > and it's working without error when I publish?
          >

          Gabriel,

          If your movie works when published by itself then it is not loading external
          files, unless it is doing so through an HTTP connection. In that case your
          file might be connecting to the web. Try disconnecting you internet
          connection and running the file.

          If it still works, then you have all you need in the .fla. I don't remember
          when it was introduced (I am using Flash 8 and 9 Alpha) but my actions
          window has a panel that lets you step through each piece of actionscript (no
          matter how nested) one by one. You sould just go through there and have a
          look.

          If your movie gives you errors when you try to publish it after
          disconnecting from the net then you can go from there and repost with the
          error message.











          • 2. Re: dynamic text - defined in action script
            aviles-drc Level 1
            I disconnected and it still works. I have Flash MX 6.0 and have not seen the feature you mention which allows viewing nested scripts. Any other suggestions aside from upgrading?
            • 3. Re: dynamic text - defined in action script
              Level 7

              "aviles-drc" <webforumsuser@macromedia.com> wrote in message
              news:ecktim$qb$1@forums.macromedia.com...
              >I disconnected and it still works. I have Flash MX 6.0 and have not seen
              >the feature you mention which allows viewing nested scripts. Any other
              >suggestions aside from upgrading?

              Put it somewhere I can grab it and I can search through.


              • 4. Re: dynamic text - defined in action script
                aviles-drc Level 1
                I am not a liberty to post the source code publicly. I downloaded a trial version of Flash 8 and didn't find the assignment of the specific text to a variable in any of the actionscripts. However, I did find the following assignment:

                txt=_parent.text;

                When I comment out this line, the default text value inside the dynamic text object is used for all instances of the movie containing this dynamic text. My question is, where does the property/variable "text" get assigned for the "_parent" (based on the above assignment)?



                • 5. dynamic text - defined in action script
                  aviles-drc Level 1
                  I found where the text variable gets assigned...

                  Given that the text was assigned by the parent, I went through all the object to find which one was instantiating the movie containing the code listed above. When I found it, I looked for the code but there were no action scripts annotated on the timeline. By chance I clicked on the Stage (at the center of the parent object I've been searching for) and I just happen to have the actionscript window opened when I saw the following...

                  onClipEvent(load) {
                  this.text="text I was looking for"
                  }

                  Thanks for helping me think this through. I had forgotten that the timeline doesn't show an "a" on the frame if it's a keyframe instantiating an object. It's too bad that these types of actionscripts aren't searchable!