PDA

View Full Version : XML and HTML


missweblash
03-14-2006, 01:00 PM
Is there a way of encoded HTML inside an XML structure?

For instance....

<book
category="fiction"
isbn="123456ABC"
price="9.99">
This is where I want to include <b>HTML</b> tags. Is it possible?
</book>

Thanks in advance
Missy

wynandm
03-15-2006, 10:44 AM
Hi, I downloaded your xml and loaded it into flash.

http://www.geocities.com/wj_mccabe/yes_it_is.zip

Download and unzip all into a folder and open swf. That should answer your question.

BagOfFun
03-15-2006, 12:21 PM
hi, could you save the fla as mx 2004? =) that would be really nice*

wynandm
03-20-2006, 05:48 AM
Sure, it's saved :D

missweblash
03-23-2006, 02:28 PM
Hmm... this does not work for me :(

I am using MX Pro 2004 (client requirement).

Any text that is wrapped with <b> and </b> tags will not display at all, i.e. when the movie is run, the wrapped text appears to have been cut out of the string. All content AFTER the wrapped text still appears including any other type of style formatting that's been applied (e.g. colour or size).

I've tried all of the following in various combinations, without success:

- setting the text field to HTML
- embedded the font in the dynamic text field
- including the font outline in the movie library
- setting alias on/off
- changing movie quality
- using external CSS with span classes

Is there something else I should know about rendering HTML in Flash?

Any advice will be greatly appreciated...

Cheers
Missy

wynandm
03-27-2006, 09:13 AM
Yeah, I also used to get that. You will see in the example the font is not embedded. If however you want to use embedded fonts, the bold and/or italics will not show up. Here's how I solve it:

I make 2 seperate dynamic text fields, and place them outside of the stage (so you dont see them). Make both the same font as the one you are wanting to display your text in. In the one you put some text and make it bold, then embed the font, and in the other you put some text and make it italic, then embed the font. That way you have embedded all the characters (normal, bold and italic)

The html should now display correctly.

The other alternative is to add the font to the library and have it export with your movie. You do this by going:

On the top right hand corner of the library there's a button which brings up a number of options for the library. There you click on "New font". From there it's pretty simple, you pick the font, tick bold and italic and youre set.

I hope this solves your problem, if not, send me your file, I will try to fix it and send it back.