2 Replies Latest reply on Jun 30, 2006 12:36 AM by PDMart

    Loading swf file with dynamic text

    PDMart
      For a website I'm creating I'm going to have a main swf file that loads individual swf files for each page. Each page's swf file loads in external text files through dynamic text boxes so i can edit the website easily. To load the swf files into the main swf file I'm using the loader component. Everything works fine except thedynamic text boxes of the swf files that are nestled in the main one do not load properly. Instead, in each text box i get a message similar to this:

      _level0.NewsLoader.contentHolder.News1

      NewsLoader is the instance of the loader component, and News1 is a variable called in through a dynamic text field from the html document entitled News1.html. The individual news swf file loads the text properly, but when the news swf file is loaded into the main swf file the text is replaced with the message above.

      Any suggestions?
        • 1. Re: Loading swf file with dynamic text
          Jan-Paul K. Level 1
          the problem might be due to the changed references if you load the movie into another one.
          is NewsLoader a MovieClip instance inside the main movie or inside the mc that is loaded into the main movie?
          If it resides inside the exteranly loaded movie, you will either need to use the lockroot attribute or use a relative reference to the News1 variable.

          Since the _level0 always points to the _root timeline (the one of the outer most movieclip) _level0 used in the external mc is different once the external movieclip is loaded into another movie.

          I suggest only using relative references, makes live much easier.
          • 2. Re: Loading swf file with dynamic text
            PDMart Level 1
            NewsLoader is the instance of the Loader component in my main swf file, and I have this code:

            NewsLoader.content._lockroot = true;

            I also think it has something to do with the code above or something similar that's causing the problem. I'm not using exact references because the script to load in the html files for my dynamic text is this:

            loadVariablesNum("News1.html", 0);

            This is in the news swf which is loaded into the main one