Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: <aucun objet>
From: Helen Triolo
Date: Fri, 5 May 2000 18:59:42 +0100

linossier michel wrote:
>
> Hi,
> i'm new in this list,
>
> i have a text file with a spanish text, and flash don't want read special
> character (with accent) like "�" "�" "�" � . i try "%E1" "%F3" "%ED" and
> "%EB", within succes!
>
You have to URL encode the characters you read in to get Flash to
display them correctly. Robert Bleeker wrote the following actionscript
routine to do that:

Comment: attach your text variable here
Set Variable: "text2Encode" = yourTextVariableHere
Set Variable: "xx" = 1
Set Variable: "partText" = ""
Loop While (xx<=Length(text2Encode))
Set Variable: "char2Check" = Ord(Substring(text2Encode, xx, 1))
If ((char2Check>63 and char2Check<91) or (char2Check>96 and
char2Check<123)
or (char2Check>47 and char2Check<58) or (char2Check>43 and
char2Check<47) or
(char2Check>39 and char2Check<43) or char2Check=33 or char2Check=95)
Set Variable: "partText" = partText&Chr(char2Check)
Else
Set Variable: "bitOne" = int(char2Check/16)
Set Variable: "bitTwo" = char2Check-(16*bitOne)
If (bitTwo>9)
Set Variable: "alphaBit" = bitTwo-9
Set Variable: "alphabet" = "ABCDEF"
Set Variable: "bitTwo" = Substring(alphabet, alphaBit,1)
End If
Set Variable: "partText" = partText&"%"&bitOne&bitTwo
End If
Set Variable: "xx" = xx+1
End Loop
Comment: here is the result
Set Variable: "encodedText" = partText

--- end routine

If you want to see a list of all the url-encoded characters, there is a
chart of them at http://i-technica.com/whitestuff/urlencodechart.html

hth,
Helen
----------------------------------------
helen triolo � http://i-technica.com
designerati-technica [dot] com � 301-424-6037
----------------------------------------

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: <aucun objet>, linossier michel

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]