A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Dynamic text field content stops half way

  1. #1
    Member
    Join Date
    Dec 2005
    Posts
    33

    Dynamic text field content stops half way

    I've created a flash file which reads an external text file. The text file is constantly updated as its a log of visitors to my website. The dynamic box reads it so far till it meets an '&.' It then stops. Is there a way with actionscript or php to cut out all these &'s?

  2. #2
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    the ampersand ("&") breaks a string in Flash. When used in .txt files, it basically tells Flash that it has reached the end of the content it's supposed to load. You need to use either the word and the unicode for the ampersand ("&") which is %26 i believe... So if your text said something like :

    myText=I was trying to import some text & it got all screwed up....

    you would write it like this:

    myText=I was trying to import some text %26 it got all screwed up....

    then you should put an Ampersand at the end of your text, to let Flash know it's reached the end. Like this:

    myText=I was trying to import some text %26 it got all screwed up.&&


    are you using loadVariables() or LoadVars() to load your file?... If you're using MX04 or higher, i'd suggest using LoadVars()...i have found it much easier/problem free than loadVariables()... you just reference the text field by instance name and leave the variable field blank.
    Last edited by madzigian; 03-09-2006 at 04:16 PM.
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center