dcsimg
A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: dynamically imported text not registering ampersand

  1. #1
    flashing since v3
    Join Date
    Jan 2002
    Posts
    401
    seems to be a problem.... flash seems to stop reading my external text file when it reaches the & (ampersand), so i opened the txt file and changed it to &.... still got the same problem

  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    74
    hello,

    i had the same problem in flash 5. never found a solution for it. (it was html text file)

    Can i ask are you using the scroll bar component in flash mx? if so, let me know how its done please.

  3. #3
    Senior Member
    Join Date
    Sep 2001
    Posts
    178
    The reason that the text file stops at the & is because when loading variables from a text file, it is the & that separates different variables (i.e. fred=1&wilma=2), so by putting an & in the text file, it thinks that it is a break for a new variable, but there is no variable there to declare, so it just loads all the rest of your text file as nothing. I'm not sure how to fix it, other than using "and" instead of "&".

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    705
    Might want to try loking up "unicode" or "url encode" I've seen this under both. You will need to replace the "&" with its code format. (ex: %0D which I think is a line break). I don't remember exactly what the ampersand cdoe is, but you can include them with this, with out flash thinking its another variable.
    frank
    http://www.geckoarts.com

  5. #5
    flashing since v3
    Join Date
    Jan 2002
    Posts
    401
    well i was aware it was interpreting it as part of the querystring, but MM documents us to use the amerspand code, on their site... which i did, and it's still fuct

  6. #6
    flashing since v3
    Join Date
    Jan 2002
    Posts
    401
    unfortunately the ampersand code wont work either, it starts with an &

  7. #7
    Senior Member
    Join Date
    Jul 2000
    Posts
    126
    Originally posted by offdahook
    unfortunately the ampersand code wont work either, it starts with an &
    No - it starts with %.
    This is URL-encoding, not HTML entity encoding.


  8. #8
    Senior Member
    Join Date
    Jun 2000
    Posts
    705
    heres a link to a url encoding chart:
    http://www.i-technica.com/whitestuff...urlencode.html
    i think the "&" symbol can be represented with "%26"


  9. #9
    An Inconvenient Serving Size hurricaneone's Avatar
    Join Date
    Mar 2001
    Location
    You know where
    Posts
    1,918

    Just wanted to say thanks

    for that link - I was trying to get a '%' symbol to show up in a dynamic txt box and it was driving me mental.

    Cheers

  10. #10
    Senior Member
    Join Date
    Sep 2001
    Posts
    178
    No, what you need to do is put the %26 into the external text file wherever you wanted to use an &. Then when you load it into the dynamic text box, load it into the htmlText of the text box, and it will interpret it as an &.

  11. #11
    Junior Member
    Join Date
    Apr 2002
    Posts
    1

    Smile it workzzzz !!!!!

    it works with the %26 for sure !

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