Nice one! That works a treat.

Thanks a lot 

Paul

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Muzak
Sent: 09 March 2008 12:44
To: Flash Coders List
Subject: Re: [Flashcoders] Insert new line in dynamic text loaded from xml

Use html:

<english><![CDATA[Mouse Controls: <br />Control your hand using the
mouse]]></english>

And enable html on the textfield and set its htmlText property, rather than
the text property

_txt.html = true;
_txt.htmlText = stringFromXML;

Check the docs for TextField (AS2):
http://livedocs.adobe.com/flash/9.0/main/00002190.html

If you're using a TextArea component, same deal, except that you assign the
text to the .text property, as the TextArea does not 
have an htmlText property.

Check the docs for TextArea (AS2):
http://livedocs.adobe.com/flash/9.0/main/00003506.html

In AS3 you don't have to specify html=true for a TextField, it works like
the AS2 TextArea.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextFie
ld.html
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/TextAr
ea.html

regards,
Muzak

----- Original Message ----- 
From: "Paul Steven" <[EMAIL PROTECTED]>
To: "'Flash Coders List'" <flashcoders@chattyfig.figleaf.com>
Sent: Sunday, March 09, 2008 12:12 PM
Subject: [Flashcoders] Insert new line in dynamic text loaded from xml


> Can someone let me know how I can insert a newline in some dynamic text.
>
> Basically I have some instructions in my flash movie that are loaded from
an
> external xml file. In the following I would like the text after "Mouse
> Controls:" to start on a new line.
>
> <clockGameMouseControl>
> <english><![CDATA[Mouse Controls:Control your hand using
> the mouse]]></english>
> <french><![CDATA[Commandes de souris:Commandez votre main
> en utilisant la souris.]]></french>
> </clockGameMouseControl>
>
> I have tried using \n as follows
>
> <english><![CDATA[Mouse Controls:\nControl
>
> But this doesn't work.
>
>
> I would appreciate any help on this matter.
>
> Thanks
>
> Paul
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to