PDA

View Full Version : HELP ME~~~ The "&" (ampersand) Problem



draglord
January 29th, 2005, 01:32 AM
Dear all,

I am a newbie in flash 5. The other day i was trying to do a project using flash to dynamically call external text file (.txt) and loaded the variables data into the dynamic text field .

Everything is fine but except that i couldn't include the special character "&" (ampersand) in the text file. If i have included it, the rest of the wordings will be truncated.

For example, i have done a flash header that can be dynamically modified using the text file (with the dynamic text field named "mainTag"):

"mainTag = MY NEW SCHOOL PROJECTS"

This loads perfectly in the exported SWF file.

However, if I add in "&",e.g.

"mainTag = MY NEW SCHOOL PROJECTS & ASSIGNMENTS"

the word "& ASSIGNMENTS" will be left out during the preview of the SWF file.

Is there is any method to solve this problem? Can anybody help out? Thank you all very much in advance.

nextstep
January 29th, 2005, 03:40 AM
try using &

draglord
January 30th, 2005, 08:34 PM
Sorry... i have tried that too.. the same things happened. Thanks nextstep.

Anyhow, i managed to find through the archive thread and found out that i need to "URL-Encode" the "&" and subsitude it with "%26"...
however how to URL-Encode? I have tried to substitude it, but the same thing happened.... could anyone help out?

amitgeorge
January 31st, 2005, 01:39 AM
are you manually creating the text file ?
if so just put in those characters.
or there will be a function in the language whith you are using...

if everything else fails, replace & with \| in the text file and replace it back in the flash file

draglord
February 2nd, 2005, 10:14 PM
oh thank you.. i think i have finally solved the problem. It seems that the when using the URL Encode, you cannot embed the font individually. It should be set to "Include entire font outline" and that will work....

Thank you all for helping out. :D