Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

xml convertito in stringa...carattere "a capo"

This is a discussion on xml convertito in stringa...carattere "a capo" within the Actionscript 3.0 base forums, part of the Flash CS3 generale category; Ciao, passo una stringha all'applicazione mediante XML, racchiudendola in un tag come segue: <stringa><![CDATA[stringa]]&...


Go Back   Forum Flash CS3 Flash CS4 > Flash CS3 e Actionscript 3.0 > Flash CS3 generale > Actionscript 3.0 base

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 25-05-08, 18:32
Member
 
Join Date: Feb 2008
Posts: 53
Rep Power: 1
acca2o is on a distinguished road
xml convertito in stringa...carattere "a capo"

Ciao,
passo una stringha all'applicazione mediante XML, racchiudendola in un tag come segue:

<stringa><![CDATA[stringa]]></stringa>

una volta ricevuto l'XML estraggo il valore lettarale, eseguo un casting per convertirls in stringa e la uso in un TextField.

Non riesco a passare il carattere "a capo". Ho provato con varie codifiche ma fin ora nessun successo.
Come posso visualizzare la stringa su due righe? spero di non dovermi inventare una codifica custom.

Grazie per i suggerimenti.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 25-05-08, 18:40
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,434
Rep Power: 6
Flep is on a distinguished road
Re: xml convertito in stringa...carattere "a capo"

Ciao

Stai usando
HTML Code:
/n
?
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 25-05-08, 19:30
Member
 
Join Date: Feb 2008
Posts: 53
Rep Power: 1
acca2o is on a distinguished road
Re: xml convertito in stringa...carattere "a capo"

ciao,
se uso htmlText con <br/> funziona
Preferivo usare text, ma in questo modo non ne vengo a capo.

Ci sono svantaggi prestazionali ad usare htmlText invece di text?
A logica mi aspetto un po' di carico di eleborazione in più dal momento che devono essere elaborati i tag.

Insomma...perchè esistono entrambe le opzioni?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 25-05-08, 19:57
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,434
Rep Power: 6
Flep is on a distinguished road
Re: xml convertito in stringa...carattere "a capo"

Il perchè esistono entrambi non te lo so dire

Però ti scrivo il codice che ho usato per l' ultimo guestbook che ho pubblicato, nel quale avevo più o meno il tuo stesso problema.

Code:
var final:String="";
			
for(var i:int=0;i<messages_array.length;i++)
{
	final+='<font color="#333333" size="13">'+"<i>"+messages_array[i].date+"</i>"+
	"</font>"+"\n"+"<b>"+'<font color="#0066FF" size="14">'+messages_array[i].name+"</font>"+
	"</b>"+'<font color="#333333" size="13">'+" says :"+"</font>"+"\n"+
	'<font color="#666666" size="14">'+messages_array[i].mess+"</font>"+"\n\n";
}

area_txt.htmlText=final;
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 26-05-08, 11:38
tem's Avatar
tem tem is offline
Moderator
 
Join Date: Jan 1970
Posts: 455
Rep Power: 39
tem is on a distinguished road
Re: xml convertito in stringa...carattere "a capo"

in alternativa..
dall'xml per andare a capo prova:

& # 10 ;

togliendo gli spazi...
__________________
http://www.thetconcept.com

Last edited by tem; 26-05-08 at 11:40..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Flash Multi Gallery
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Flash CS3 for simple "stick figure" animation, is Flash CS3 the right tool, or not? Thirties Flash CS3 eng 2 28-09-08 13:49
Actionscript 3 Problema "dinamico":in locale funziona, sul sito no - forse è "fl.transition"? Dexter Actionscript 3.0 base 1 19-09-08 09:24
Actionscript 3 Problema con "evento:MouseEvent" e "evento.target.name" Baro Actionscript 3.0 base 2 02-08-08 20:21
Flash CS3 link sotto una finestra "popup" (swf esterno) funzionanti? come mai??? leopardone Flash CS3 generale 1 01-07-08 13:36
Actionscript 3 Problema con carattere a capo (\n) oneair Flash CS3 generale 3 12-06-08 23:53


All times are GMT. The time now is 08:09.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406