2 Replies Latest reply on Jul 7, 2006 11:10 AM by wizardmatt

    Scroll Banner based from text file

      I am trying to build a quick update option for an information tool. Right now it takes about 2 hours to publish to our help system. I am thinking though there should be a way to place a flash project on a website which reads text from a file perferably a text file. I could possibly build a xml file update application and then have the banner read xml, but looking for a quicker and simplier way.

      Is it possible to have a movie or dynamic text box to read the text from a file and display it in the banner? If so could an example be provided, or a bit of detail around how to do this. I have basic knowlage of actionscript and have built xml driven projects. The issue is I need simple as I will pass this flash program off to a less trained person for maintance

      Thank you
        • 1. Re: Scroll Banner based from text file
          Hi WizardMatt,
          1. Create a dynamic text box.
          2. In the Properties window, type in the variable myText and in the instance window give it an instance name of BannerText.
          3. in frame 1 of your movie, type in:
          BannerText._x = -400;
          4. Create a text file called text.txt and save it to the same location as you save your movie. In the text file type: myText=This text was loaded from the text file.
          5. In frame 2 of your movie type:
          BannerText._x = BannerText._x + 2;
          if(BannerText._x == 600)
          BannerText._x = -400;
          6. In frame 3 of your movie type:

          My movie was 550 pixels wide. I guessed my text box to be a little less than 400 pixels wide.

          This is a really simple way to do what I think you requested
          • 2. Re: Scroll Banner based from text file
            wizardmatt Level 1
            Thank you FishMoose. The text loading part worked I had to make a few adjustments to the code for the scrolling part but no problems. I also set the gotoAndPlay(1) instead so it would keep loading the data if the text file changed. Overall though you provided me with all the information I needed. Thanks.