getdjed
08-26-2005, 11:40 AM
Hi!
Thanks in advance for reading my post and for any help given.
I have a comboBox that loads .xml text into a text field. I'm using the following code (thanks xeef for the script ):
//load css
aStyle = new TextField.StyleSheet();
aStyle.load("a.css");
textField.styleSheet = aStyle;
//load in XML
textContent = new XML();
textContent.onLoad = function(success)
{
if(success)
{
textField.text = textContent;
}
}
//comboBox
L = {};
L.change = function(eventObj) {
Index = eventObj.target.selectedIndex;
//here you also coud use the label as file name
//just change data-->label
LOAD(eventObj.target.getItemAt(Index).data);
};
ComboBox.addEventListener("change", L);
function LOAD(URL) {
//or what ever you use to load it
//take care of pathing !
textContent.load(URL, 0);
trace("Here you load rutine "+URL);
}
// Add's the eventListen to be called when someone changes the comboBox
ComboBox.addEventListener("change", form);
The problem is that I've got lots of .xml files to be loaded and I want to have them into an specific folder outside the flash movie. How can I define the path into this script???
Thanks a lot :)
Thanks in advance for reading my post and for any help given.
I have a comboBox that loads .xml text into a text field. I'm using the following code (thanks xeef for the script ):
//load css
aStyle = new TextField.StyleSheet();
aStyle.load("a.css");
textField.styleSheet = aStyle;
//load in XML
textContent = new XML();
textContent.onLoad = function(success)
{
if(success)
{
textField.text = textContent;
}
}
//comboBox
L = {};
L.change = function(eventObj) {
Index = eventObj.target.selectedIndex;
//here you also coud use the label as file name
//just change data-->label
LOAD(eventObj.target.getItemAt(Index).data);
};
ComboBox.addEventListener("change", L);
function LOAD(URL) {
//or what ever you use to load it
//take care of pathing !
textContent.load(URL, 0);
trace("Here you load rutine "+URL);
}
// Add's the eventListen to be called when someone changes the comboBox
ComboBox.addEventListener("change", form);
The problem is that I've got lots of .xml files to be loaded and I want to have them into an specific folder outside the flash movie. How can I define the path into this script???
Thanks a lot :)