Forum Moderators: open

Message Too Old, No Replies

xml connector componant stops

         

diegomh7

5:18 pm on Mar 29, 2007 (gmt 0)

10+ Year Member



My xml connector componant is connected to a tree componant, it works when the ojects are on the first frame of the scene ,then i get two problems,

1. if i add a scene it stops working? I think its having trouble targetting the object and dont know how to change where the bind is. ive tried messing with the (bound to : parameters) menu with no joy.

2. if i manage to get that working, i need the tree to be on scene three. I think the xml conntector has to be triggered on the first frame of the first scene in the movie but would love to know how to target the tree in scene 3 from the xml connector in scene1.

Is it even possible to do what im trying to do, im a firm believer in "theres always a way" but this one has me doubtimg flashes ablity in the componant flexibility category,

please help asap,

regards,

Diego

diegomh7

6:45 pm on Mar 29, 2007 (gmt 0)

10+ Year Member



right ive dragged a tree on the scene, got rid of the xml connector, named the tree pupil_tree and then stuck this in the code on the actions layer,

var pupil_tree:mx.controls.Tree;

var treeDP_xml:XML = new XML();
treeDP_xml.ignoreWhite = true;
treeDP_xml.onLoad = function(success:Boolean) {
if (success) {
pupil_tree.dataProvider = this.firstChild;
}
};

treeDP_xml.load("tree.xml");
var treeListener:Object = new Object();
treeListener.change = function(evt:Object) {
var treeNode:XMLNode = evt.target.selectedItem;
};
pupil_tree.addEventListener("change",treeListener);
this.pupil_tree.setStyle("backgroundColor",0x3C8534);
this.pupil_tree.setStyle("color",0xFFFFFF);
//this.pupil_tree.setStyle("borderStyle","none");

result is it works,

now,

I need to make it so when you click on the results is loads data from another file basedd on the selected item and then returns it to the flash file and autofills some dynamic text boxes?

ideas anyone?.