-
ASP and Flash
I am trying to read an asp file with flash. That works when asp generates normal characters. For example
Asp generates
hello
hello2
Flash shows
hello
hello2
So that's OK
But when asp generates special characters flash can't read them. For example:
Asp generates
hello&
hello2
Flash shows:
hello
What's the problem and how can I solve it? It has to do something with special characters
-
with the Ampersand (&) you tell Flash to expect a new variable
So, if you send something like this text1=hello&hello2&text2=yourName Flash expects hello2 to be a variable but it gets no value...... So all of the following variables will also stop to be read.
The answer.
There are several Characters, that can be solved with an 'Escape sequence' like variable1=hello \"name\" is here
For the Ampersand (&) you will have to use the 16bit unicode \u0026
(actual unicode Charts http://www.unicode.org/charts)
(example: Cigarettes=Benson \u0026 Hedges&smoking=no would give you two variables : Cigarettes("Benson & Hedges) smonking("no"))
attetion: the font you are using in the textfield must be embededd totally, that means check the [.......] in the textoptions!! and if your desired font has no character for the character you've sent
(some Fontsets don't have the €-Sign, for example, it won't show up either)
Anway, have fun and the
-
-
no answer
thanks for all your trouble but that article won't solve my problem.
-
I have tried your solution but when I let ASP generate hello \u0026 hello
flash shows: hello \u0026 hello
Flash must show: hello & hello
-
yes, you're right.... i've got this from the helpfile included with the flashpackage... sorry, can't help you then
-
When you say youo are trying to read an asp file does that mean you are trying to read variables in from the asp page or that you are trying to read the whole page?
-
whole asp page
Originally posted by garethwdesign
When you say youo are trying to read an asp file does that mean you are trying to read variables in from the asp page or that you are trying to read the whole page?
I am reading the whole asp page.
The whole page is put in a variabele
-
Text to Flash
Hi In you ASP page you must URLEncode the text before sending it to Flash. Then if it still displays improperly you need to escape() the variable and your text should be fine. I did this with a large ASP/Flash site a while ago and am writing this from memory
Look up actionscript "escape()" and "unescape()" and ASP "URLEcode"
asp example "fnHelp =(Server.URLEncode(rsHeader.Fields.Item("nHelp").V alue))"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|