XML FLASH FORMATTING HMTL
- Started
- Last post
- 56 Responses
- joyride0
myStringVar = "strings are inside qoutes"
myVar = no quotes
myBooleanVar = True or False
myNumberVar = 10I didn't put the strict declarations in because I think NT strips them out. but they would look like this and you should use them.
myStringVar:String = "Something"
- FrdmOfSpch0
i understand you find it frustrating helping someone completely new to XML st33d. It's ok, you dont have to offer any more, you've done enough.
anyway,
so i got a dynamic text box on stage, articlewindow.article
i'm poopulating this using xml but i want it formatted cos its gonna be sevearl paragraphs worth of text.
so after a bit of research i got this in the actionscript on my timeline:
htm = xml.firstChild.childNodes[i].chi...
articlewindow.article.html = true;
articlewindow.article.htmlText = htm.nodeValue;is that it? doesn't work
i'll keep ploughing.
- flavorful0
You’re poopulating it alrite.
- FrdmOfSpch0
string is whatever value you are passing from your xml.
cram
(Apr 10 07, 10:36)i think that's the misunderstanding here.
THe xml is DYNAMIC. It will have different values and will be created using PHP/MySql,
i dont want a fixed string there. Right now my text box says "undefined" and then when i click on the button that's meant to load the formatted tag it goes blank.
if i put the string as: xml.firstChild.childNodes[i].chi... to target the tag that contains the "string"?
- joyride0
haha flav.
step 1 parse the xml and make sure it traces out. trace(myNodeVariable);
Step 2: create the dyn text box. Make sure that exists. trace (nameOfTextBox)
Step3: push the data into the text box.
Done!
Make sure everything is there otherwise you're pushing the data into nothing. which won't work. Break it down into steps to debug what is going on.
- joyride0
ok dude. The xml is dynamic? So it changes each time you press something (the trigger)?
You need to do a sendAndLoad each time you press something if that is the case
- FrdmOfSpch0
BINGO!!
Fucking hell, this bollox has been bugging me since yesterday
Thanks all.
You knw what it was? I can't do BOLD thats all.
I had the HTML formatting working all along.
I'm using times new roman just as for now until i get the rest of the site done.
I've put embed all fonts and it still wont embed bold
But fuck it, thats another story.
Time for a spliff.
Nice, cheers, a whole new world opens up for me. Wonder what i can do with this
btw - can you put in javascript into xml in the same way?
:D
- acescence0
to get bold to work, you need to embed both fonts. put a character from each font into the field to force it, or if you're using the library, the font needs to appear twice, once with the bold option set.
- PonyBoy0
dude... i told you yesterday bold was 'silly' in flash... you need to embed a font that has 'bold' built into it in order for BOLD to work...
... *sigh
... your frustration is my frustration. :)
- FrdmOfSpch0
haha, you were right ponyboy :)
bold is an ass. but its cool, i can work round it, i'll just use line breaks and/or underlines and or centre text for headings or woteva.
i wanna do something more complicated inside the xml now. wish me luck.
- PonyBoy0
GOOD LUCK!!! :)
Once you understand the finickiness of Flash... all the sudden you can ACTUALLY WORK IN IT!!
I promise!! Happy Flashing, duder!
- material-10
this is some 'edge of the seat' type shit
- flavorful0
Can we please for the love of everything holy see the finished product?
- Mishga0
Can we please for the love of everything holy see the finished product?
flavorful
(Apr 10 07, 12:55)You mean...an online working example?
- flavorful0
No Mishga, I would like to see exactly what FrdmOfSpch is doing with Times New Roman, et cetera.
Well not so much et cetera, I really want to see how using Times New Roman comes into play.