Special characters within Actionscript

Ok so i’ve searched through the forums and only found hints on special characters when loading text from an external source like mysql or php, however my problem seems different because I can’t get those solutions to work. I simply want to add quotes around a portion of text that is in the actionscript being loaded with a createTextField. If i use the Qoutes themselves they interfere by breaking up the text since the loaded text is specified by “whatever the text is”;
and I tried things like &qout; %22 and " but none of them read correctly. I also tried adding the
System.useCodePage=true;
script but wasn’t quite sure where to pt it but no matter where I did try it didn’t seem to work

hopes this makes sense

also for some reason I can’t get multiline=true; to work and am having to use
for every line break. Exhausting when formatting many paragraphs of text. any hints on either would be greatly appreciated
Cheers!
erok

post your PHP code… I’ve solved most issues around HTML and other encoding issues… usually it’s a simple $str = encode(utf8($str)); command or some such

sorry, no php involved
it’s all actionscript
_root.createTextField(“tfNewfield2”, 2, 0, 0, 416, 160);
_root.tfNewfield2.text = “my text yada yadada but then I want to quote something “like this” and then end”;

but the qoutes breake the code
hope this makes sense

anyone???
:{ < that’s a sad seal, obviuosly bored and waiting, well I’ll move on and be back in a minute.

owww it replaced it with a smilly???
didn’t know there were quick keys for smilies

obvious question… but after creating the textfield, did you remember to set htmlText to true? then use " in your text… umm why are you creating a text box with BUILT in text? why not just use a static text box? I can’t imagine it adds alot to file size…

ok, back to the basics.
I tried what you suggested, again, but I didn’t get any result. Maybe I’m putting the code in the wrong place?? but I tried multiple different arrangements out of frustration and still didn’t get a result I was looking for. The reason I am doing this is because there is no need to load it externally since it won’t change, but I want to be able to format the text’s color and and use italics etc. Creating text boxes dynamically is the only way I could figure it out. I realize this might be simple for you but I just can’t get the " to work. I’m using an imbeded font that was added to the library so that the font could be of my choice as well, and I am sure that the font has a “”" characters, but maybe it has to do with somthing along those lines. I’m stumped. Any suggestions.
Any help is greatly appreciated and I hope I don’t sound like a rambling fool, but I’m fed up because I feel like I have tried it all, and I just can’t get it to read the " as html text. AAAHHHHHHH

Hi
Based from your

_root.createTextField(“tfNewfield2”, 2, 0, 0, 416, 160);

I would add the textfield property of multiline and htmlText like

_root.createTextField(“tfNewfield2”, 2, 0, 0, 416, 160);
_root.tfNewfield2.multiline = true;
_root.tfNewfield2.wordWrap = true;
_root.tfNewfield2.html = true;
var tryThis = ‘<p>my text yada yadada but then I want to quote something "like this" and then end</p>’;
_root.tfNewfield2.htmlText = tryThis;

_root.tfNewfield2.property = Pick a property( The properties appear in the following

order: variable, text, htmlText, html, textWidth, textHeight, maxChars, borderColor,

backgroundColor, textColor, border, background, wordWrap, password, multiline, selectable,

scroll, hscroll, maxscroll, maxhscroll, bottomScroll, type, embedFonts, restrict, length,

tabIndex, autoSize.)

More info online at

http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/html/wwhelp.ht

m?href=Part_ASLR.html

http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00000238.html

and you may want to use the textfield Stylesheet to load other properties
http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/html/wwhelp.ht

m?href=Part_ASLR.html

Hope that helps point you in the right direction
Findal
www.fndzinz.com

OK, just waiting.
hope a the fish’ns a goin a well.

There, NOW the code works
:slight_smile:
Fishin’s Great!

posting some code could help… what I really don’t get is the dynamic part (yet), you want to format the text, on the fly? based on a users input? or you want to be able to swap CSS, later? it seems like the easiest way to do this, is to make it an external file (I know you said it won’t change) but if coding it inside the AS causes issues with display, then use Flash’s built in error correction for external loading… I think you’re making the problem harder than it has to be… plus it can’t really hurt having it external, cause maybe, just maybe you will need to change it…

took a quick look at it. Seems like it should work, but real bussy all of a sudden trying to get something else out so I’ll have to come back to it, but thanks for the help. Greatly appreciated, it definatly points in the right direction, and in the future I probably will just use external text no matter what. Oh and when I mentioned dynamic I just meant that it wasn’t static, but that’s probably using the wrong tech verbage as I was being to vague. Sorry for the confusion.
thanks again,
give a man a fish and feed him for a day
teach a man to fish and he’ll never go hungry, or something like that.
erok