Flabell New Product: XML Banner Rotator
It’s that time of the week when we release a new Flash Component on Flabell. This week is time for the first XML Banner Rotator.

It’s that time of the week when we release a new Flash Component on Flabell. This week is time for the first XML Banner Rotator.

Minimalist Photographer Template. This template is perfect for showcasing your portfolio with style. It has a minimalist design with powerful features, such as the integration with SWFAddress, useful for activating the browser’s back button.
As you probably heard in AS3 to treat the “release_outside” event it’s a little bit tricky.
But AS3 comes with solutions for everything even for “stage_leave” event. In AS2 you couldn’t do that.
Now you can do that by treating the “Event.MOUSE_LEAVE” event.
To do that you need to use event listeners also on stage.
This is how we do it step by step:
If you ever need to use HTML text read from XML to present it in a flash content you need to respect the following:
1. The html text needs to be nested in a CDATA tag inside the XML file like this:
<item><![CDATA[ Dummy text <br> Dummy text <br> ]]></item>
2. The textfield that is going to be used to show the text needs to have the property html set to “true” and write the text in the htmlText property like this:
textField.html = true;
textField.htmlText = “text”;
3. The most important: if you are programming in AS2 it is mandatory to read the text from the XML tag using “firstChild.nodeValue” like this:
var htmlTextFromXML : String = node.firstChild.nodeValue; // the read text will be “Dummy text <br> Dummy text <br>”
If you use only “firstChild“, the html tags will be interpreted and their special characters like “<” will be converted:
var htmlTextFromXML : String = node.childNodes[i].firstChild; // the read text will be “Dummy text <br> Dummy text <br> ”
I hope this hint will help you to use much better the XML files in Flash developping.
You can download the source files for this tutorial from here.
blog entries RSS Feed
products RSS Feed
Download the plugin above
Read more about Flabell WordPress plugin
© 2008 - 2012 Vuzum, LLC / Terms & Conditions / Privacy Policy