Featured FLA
» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden
Featured Site
» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.
Loading XML information into the ComboBox component
Drag an instance of the ComboBox component onto the stage and name it
CBOLoadSites.
Add the following function to the actions layer, immediately above the
stop action. The function tests that the XML file loaded successfully,
loads the sites and URLs into arrays, creates a default item
and adds the sites and URLs to the ComboBox
component.
function LoadCombo(success) {
if (success) {
//set variables
var BaseNode=thisXML.childNodes[0];
var ComboSites = new Array();
var ComboURLs = new Array();
var ThisNode;
//add a default item to the combo box
CBOLoadSites.addItem("-- select site --");
//get sites information
for (i=0; i
ThisNode = BaseNode.childNodes[i];
ComboSites[i] = ThisNode.attributes["siteName"];
ComboURLs[i] = ThisNode.attributes["siteURL"];
//add to combo box
CBOLoadSites.addItem(ComboSites[i],ComboURLs[i]);
}
}
}
You add a change handler as shown previously in the Adding a change handler
section.