Template Categories

templates categories Automobiles
templates categories Business
templates categories CSS Templates
templates categories E-Commerce
templates categories Education
templates categories Fashion
templates categories Greeting Cards
templates categories Hotels
templates categories Jewelry
templates categories kids
templates categories Models
templates categories Music - Films
templates categories Night Club
templates categories Real Estate
templates categories Restaurant
templates categories Software
templates categories Sports
templates categories Travel
templates categories Web-design
templates categories Wedding

Tutorial Categories

tutorial categories AJAX
tutorial categories CSS
tutorial categories Dreamweaver
tutorial categories Flash
tutorial categories FTP - File Transfer
tutorial categories HTML Emails
tutorial categories Javascript
tutorial categories Microsoft Excel
tutorial categories Microsoft Windows
tutorial categories Microsoft Word
tutorial categories MySql
tutorial categories Photoshop
tutorial categories Php
tutorial categories Windows Movie Maker
tutorial categories Xhtml / Html

Flash - Using XML to load external data

BELOW IS THE EXAMPLE OF WHAT WE ARE GOING TO CREATE.
In this tutorial I will show you how to load external text data using XML.
Using XML you can import different types of media in flash files like text, images etc. This becomes convinient because if you want to make any changes to the flash file in future then only the xml content needs to be changed.

1. Create a new document and size as per your requirements.

2. Name the default layer as dynamic boxes.

3. While you are on this layer draw three text boxes. Choose Dynamic from the text type properties drop down menu. Give each text box a different instance name. In our case we have given it a name of text1, text2 and text3 respectively.

4. Insert a new layer and name it actions. Paste the following code selecting the first frame and pressing F9 to get the actions window.

function contentXML(loaded) {
if (loaded) {
_root.main1 = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.main2 = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
_root.main3 = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
text1.text = _root.main1;
text2.text = _root.main2;
text3.text = _root.main3;
} else {
content = "unable to load !";
}
}
xmlCon = new XML();
xmlCon.ignoreWhite = true;
xmlCon.onLoad = contentXML;
xmlCon.load("input.xml");

5. Now create an XML file using usingpad or any other WYSWYG editor and paste the following code.
<?xml version="1.0"?>
<datasheet>
<data>
<heading1>gateway2internet.com</heading1>
<heading2>Webdesign tutorials & Templates</heading2>
<heading3>For basic and Intermediate users</heading3>
</data>
</datasheet>

6. Save the above file as input.xml.

7. Test your movie.

Hope you enjoyed this small tutorial on how to load external data using XML.
travel to india - kerala travel to india - Goa forums gatewa2internet ... myspace & home page gatewa2internet ... myspace & home page