3 Replies Latest reply on Oct 20, 2006 7:13 AM by Newsgroup_User

    Dynamic Text Loaded Into Ext SWF Not Present In Master SWF

    Level 7
      Just as my subject line states, I have an external swf (pharaoh.swf) which
      loads a .txt file into a dynamic text field. All works well when I preview
      the movie. Here's the problem, pharaoh.swf gets loaded into a blank mc in my
      master.swf. When I preview master.swf, pharaoh.swf loads but the external
      text does not. I think this code maybe the problem:

      //contained on my blank_mc in pharaoh.swf

      onClipEvent (load) {
      loadVariables("text/pharaoh.txt", this);
      }
      onClipEvent (data) {
      _root.scrolltext.htmlText = this.pharaoh_text;
      }

      I believe that the "_root.scrolltext.htmlText..." is the root of my
      problems, (pun intended). By logical standards, "_root" is trying to target
      scrolltext (dynamic text instance name) in the master.swf yet scrolltext
      only exists in pharaoh.swf. I tried to retarget it to "this." but it breaks
      and the text doesn't load when previewing pharaoh.swf or the master.swf.

      Any ideas on how to retarget this to work properly?


        • 1. Re: Dynamic Text Loaded Into Ext SWF Not Present In Master SWF
          Level 7
          Anybody have an idea?

          "Pharaoh" <sneekler@verizon.net> wrote in message
          news:eh8a2e$dr8$1@forums.macromedia.com...
          > Just as my subject line states, I have an external swf (pharaoh.swf) which
          > loads a .txt file into a dynamic text field. All works well when I
          > preview the movie. Here's the problem, pharaoh.swf gets loaded into a
          > blank mc in my master.swf. When I preview master.swf, pharaoh.swf loads
          > but the external text does not. I think this code maybe the problem:
          >
          > //contained on my blank_mc in pharaoh.swf
          >
          > onClipEvent (load) {
          > loadVariables("text/pharaoh.txt", this);
          > }
          > onClipEvent (data) {
          > _root.scrolltext.htmlText = this.pharaoh_text;
          > }
          >
          > I believe that the "_root.scrolltext.htmlText..." is the root of my
          > problems, (pun intended). By logical standards, "_root" is trying to
          > target scrolltext (dynamic text instance name) in the master.swf yet
          > scrolltext only exists in pharaoh.swf. I tried to retarget it to "this."
          > but it breaks and the text doesn't load when previewing pharaoh.swf or the
          > master.swf.
          >
          > Any ideas on how to retarget this to work properly?
          >


          • 2. Re: Dynamic Text Loaded Into Ext SWF Not Present In Master SWF
            TimSymons Level 1
            I agree with your take that _root is the probelm. To work with what you have you might want to try using the _lockroot property. It may help.

            Tim
            • 3. Re: Dynamic Text Loaded Into Ext SWF Not Present In Master SWF
              Level 7
              I'm not farmiliar with the _lockroot property but it sounds powerful.
              Anyway, I fixed the problem. It was a matter of simple targeting. I missed
              one step in the line, it was the movie clip "container_mc" that holds the
              pharaoh.swf. I changed the targeting to
              "_root.container.scrolltext.htmlText = this.pharaoh_text;" and all is
              working perfectly. I love it when the answer just comes along and smacks
              you in the face.

              Thanks for the rely.

              Pharaoh

              "TimSymons" <webforumsuser@macromedia.com> wrote in message
              news:ehal9a$d8b$1@forums.macromedia.com...
              >I agree with your take that _root is the probelm. To work with what you
              >have you might want to try using the _lockroot property. It may help.
              >
              > Tim