A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: URL encoding troubles

Hybrid View

  1. #1
    Member Mofo SwirlyKing's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    476

    URL encoding troubles

    I have html formatted text getting placed into a dynamic text box and everything works perfectly, except that I'm trying to write this:
    Code:
    for (i=1; i<=10; i++){
    trace ("i = "+i);
    }
    and I need to replace "<" with "%3c" for URL encoding, but it won't let me do it. It seems like it's replacing the "%3c" with a "<" and then treating it like it a tag bracket again. But I can do "%3e" for ">" with no problems at all.

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yeah! Talk to me about it! Bumped on that one a long time ago...
    Finally came up with this solution...

    To print a "<", in your text file -> %26lt; HELLO %3E...

    Should output "< HELLO >"...

  3. #3
    Member Mofo SwirlyKing's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    476
    Old newbie,
    Thanks for the help. I also just found another solution. If I put <pre> and</pre> around it, I can type whatever I want with no URL encoding!!!

    so <pre> <HELLO%> </pre> will give me <HELLO%>

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Well good for you! Problem is that doesn't seem to work in MX only and most certainely didn't in Flash 5 at the time I needed this!

  5. #5
    Member Mofo SwirlyKing's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    476
    must be new to MX 2004. It's a standard html tag that I didn't know.

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Using CSS on this?

    To my knowledge, this is still (even for MX2004) the only officially 11 or so html1.0 tags supported by Flash, although the <li> tag somewhat works...

    http://www.macromedia.com/support/fl...s/htmltext.htm

  7. #7
    Member Mofo SwirlyKing's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    476
    Yes, I am using CSS. I didn't think that would make a difference, but I guess it does - although I didn't officially test it without CSS.

    BUT, this wasn't used in the CSS itself, I added it to the text. So my actual text file is this:
    Code:
    <c><pre>for (i=1; i>=10; i++){
        trace("i = "+i);
    }</pre></c>
    Where "<c>" tag is from the styleSheet and I just added "<pre>.

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