Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-29-2005, 06:34 PM   #1
Join Date: Sep 2004
Posts: 45
Default xml and actionscript help!

i really cant understand it but every line break i make in the xml converts to two in flash!


im the second line

(flash dynamic textfield)

im the second line

please! i really can't figure it out. i tried enabling html and then putting <br> but it reads br as another node! i tried changing < to &gt; but it also doesnt work as it just shows <br>
corroded is offline   Reply With Quote
Old 03-29-2005, 08:52 PM   #2
Registered User
Join Date: Sep 2004
Posts: 90
Default look at the intermediate tutorial...

man it's good. you have to do the includewhitespace thing to it... let me find it again...

WHATEVERYOURFILE.ignoreWhite = true

also try this...
Now is a good time to talk about ignoreWhite and also the condenseWhite property which I alluded to earlier.

ignoreWhite excludes all white-space (linebreaks, carriage-returns, non-breaking spaces) from our XML when it is brought in to Flash (ie parsed). However, it is only the white-space inbetween the nodes, and nodes that contain nothing but white-space that are ignored. Any white-space within a text node, including leading or trailing whitespace, is preserved. You can see this for yourself by opening up the kungfu.xml file, and inserting a carriage-return (ie press the enter/return key) directly after an opening tag such as <snake>. Now save your ammended XML file and test the fla. When you test it you can see that the whitespace is included.

There is however a solution to this potential formatting problem. You can use condenseWhite to get rid of that unwanted whitespace within the node. For a TextField use: TextField_Instance.condenseWhite=true; and for a TextArea use: TextArea_Instance.label.condenseWhite=true;.
Many thanks to Christopher Watts and Rob Verhoef for the info and solution here =)

this is taken from here

enjoy. but try the condenseWhite=true first.
superbnerb is offline   Reply With Quote
Old 03-30-2005, 01:17 AM   #3
Registered User
Join Date: Sep 2004
Posts: 90

another thing, don´t all line breaks in html format go two wide by default... i.e this is your problem isn´t it? i´d see if your text box is set to html also in your main stage.
superbnerb is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 09:03 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.