XML FLASH FORMATTING HMTL
- Started
- Last post
- 56 Responses
- FrdmOfSpch
Hello
I've got XML data being loaded into Flash dynamically, probably eventually using server side technology.
Problem is i dont know how to format this data.
How do you do that anyone know?
Like i'm importing big several texts dynamically via xml into the dynamic text field but its all unformatted. How do i put line breaks and make the title bold or italic or centred within the same xml tag??
Can i use HTML style formatting within XML tags? like:
bla bla bla i am the best bla bla bla and then some other text
I dont know how to do this. I'm new to this. I dont want a sperate tag for the title to make it bold, cos then how do i get line breaks within all that text regardless?
This is all going through flash and i don't know how to do it. Not gonna use xsl.
Is there a simple solution.
tia
- material-10
use html formating
- flavorful0
Also, in the past I have also used simple fake codes in XML files and had them found/replaced when read by the browser.
- FrdmOfSpch0
CDATA treats all programmatic script within the tags as text. so no
i'm not using HTML, i'm using XML.
T.I.A.
- Milan0
Use CDATA to get your HTML-formatted text into a Flash textfield.
your textfield must be set to use HTML though.
myTextField.html = true;
Flash doesn't support many html tags, check flash help for supported tags. and a few others work...
- Milan0
err... last part is supposed to say:
bold, italic, underline and a few others work...
- PonyBoy0
using CDATA works great...
... just make sure that when you're parsing the node you access the value of the node using 'nodeValue'.
myText_txt.htmlText = myXml.firstChild.childNode.nodeV...
(or something like that!!)...
... if you don't use 'nodeValue' to grab that info. (even IF you set your text field to html), you'll still end up w/a bunch of tags in your output as apposed to formatted text.
- FrdmOfSpch0
Here is a bunch of text]]>
so is this meant to to make the text bold? if i have .html = true
cos it doesn't. it makes it disappear
did i miss somthing?
- FrdmOfSpch0
sorry this:
Here is a bunch of
text]]>
it made the text disappear
- PonyBoy0
soemthing tells me alot of your script was ejaculated by the PVN... ?
- FrdmOfSpch0
wtf??
now what is the point of having a website for designers if you cant even post code?
- mrdobolina0
table art thread killed the ability to post any code.
- FrdmOfSpch0
Here is a bunch of
text ]]>
does this work?
- material-10
wtf??
now what is the point of having a website for designers if you cant even post code?
FrdmOfSpch
(Apr 9 07, 14:13)maybe try a flash or dev forum
- FrdmOfSpch0
great, i guess we'll stick to talking about jevad's near death experience and jenna jameson's facelift.
- FrdmOfSpch0
< ![CDATA[< html ><strong> Here is a bunch of
text < / b >< /html >]] >< /article >
- FrdmOfSpch0
< article > < ! [CDATA[ < html > <strong>Here is a bunch of text < /b > < /html >]] > < /article >
- FrdmOfSpch0
eugh, ok, yeah, so i got the above in my XML document.
would that be ok to make my text bold for example?
to format it htmly style?
maybe theres some problem in me setting my textwindow.html = true but it turns out blank.
- PonyBoy0
pastebin.com doesn't seem to be working right...
... try using this:
then paste the link to your script in the PVN...
- FrdmOfSpch0
it's posted three posts above
her it is:
http://rafb.net/p/Nj68Hw60.html
is that meant to make the text bold? cos it makes it nothing.