|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
does anyone know if it's possible to have HTML within a XML document, and then get successfully imported into Flash? For instance, one of the XML nodes to have a hyperlink to another website...if Flash is parsing the XML, wouldn't it treat the hyperlink tag as another node? Are there any good tutorials or online guides regarding this subject? Thanks in advance to anyone who can help with this |
|
#2
|
|||
|
|||
|
hey,
why would you need to put the hyperlink in the XML? couldn't you just name your node <link> and then tell flash to make a hyperlink out of that node? (by making your text field html enabled and just writing the <a> tag in flash? bret |
|
#3
|
|||
|
|||
|
...yes...that may just work...thanks!
|
|
#4
|
|||
|
|||
|
Actually I have the same need but for different reasons...
I have to encode in unicode a russian text, title and lists. Thus I have a text in Russian that can't be written directly in flash which does not understand Russian by himself. However an encoded XML does the trick. Point is how do you tell flash to start a new line while not using the <br> tag? if you start new lines in XML that would be interpreted by flash as a two line break. And if you : <![CDATA[ blablabla ]]> then flash interpret the <br> as plain text even if you load the file as htmlTxt... You are my last hope before I code a subnode list with a while procedure under flash that would recreate the formated text list. Thanks for helping |
|
#5
|
|||
|
|||
|
well, flash stores new lines using the escape symbol \r. you might try throwing those in where you want line breaks...
bret |
|
#6
|
|||
|
|||
|
I've done this
There is a way to parse regular html tags through xml into flash 6. I had to do this for this project: http://www.industrialartistmanagement.com - a dynamic flash site I put together (with the help of a great asp guy).
Here's how we did it: First all html tags need to be converted to escape text - so "<B>" becomes "<B>". This is because xml uses the "<>" characters to define nodes, so any "<" has to be converted to "<" and ">" becomes ">". Then in flash you need a dummy text object that is outside the viewing area. Let's call this text object "dummyText". When parsing the xml in flash you do this: dummyText.htmlText=currentNode.firstChild.toString(); Let's say the html textfield you want to display is defined by a variable called "mytext" - then you set mytext like this: mytext=dummyText.text; going from dummyText.htmltext to dummyText.text actually converts the "<" and ">" characters back to "<" and ">" which then displays properly in your html textfield. Yes my head was cracking over this nut for a while. Feel free to ask me for clarification... peace -flydaddy |
|
#7
|
|||
|
|||
|
I know this was a little while ago but I'm trying to use html within an xml doc that's being read into Flash. When you first put it into a "dummy" text field with all of the tags escaped, did you assign the real text field to the dummy text field in the same frame or did you set it to the dummy text in one frame and then to the "real" html field in the following frame?
|
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Importing HTML-embedded XML into Flash |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|