Hi all,
It's been a while i didn't ask help,
In this script, flash get the datas by an XML conexion witch is working fine.
Have Ids (number) of states where datas are given by database. States only where Datas are specified.
Then on my stage, I have all the states in movieclips, with an Id.
I would like to change status (color) of the state if it's given by the XML so if Data is On, and give another status(color/ no button) for all other ones.
ActionScript Code:
RollOver = new Object(); RollOver = 0xFFC000;
Actif = new Object(); Actif = 0xFF00CC;
RollOut = new Object(); RollOut = 0xDD00EE;
MovieClip.prototype.onRollOver = function(){
colored = new Color(this);
colored.setRGB(RollOver);
}
MovieClip.prototype.onRollOut = function(){
colored = new Color(this);
colored.setRGB(RollOut);
}
// all this color works fine
// then the hard part !
var i = new Object();
for (i in _root){
if ( _root[i] instanceof MovieClip ) {
colored = new Color(_root[i]);
//trace (i);
for(var n=0; n=<table.length; n++){
if (i == x.childNodes[n].childNodes[0].attributes.number){
colored.setRGB(Actif);
trace('si '+ i + ' - ' + x.childNodes[n].childNodes[0].attributes.number);
// by default, all movieclip is button
}
elseif ( i != x.childNodes[n].childNodes[0].attributes.number){
trace('no '+ i + ' - ' + x.childNodes[n].childNodes[0].attributes.number);
colored.setRGB(RollOut);
//Here I also want to block the rollover possiblity ( delete the button status)
}
}
};
}
trace(i) give me all the list of states (they are in my library, 1 movieclip = 1 state)
trace (x.childNodes[n].childNodes[0].attributes.numero) gives me all the numbers of states I have in my XML .
So far I have tested, I get where the last trace gives me only the elseif (no...)
Any Idea why this doesn't work ? and how I can define the " no click" possibility ?
is there something like in css : cursor : none; ?
I'm in AS1 flash player 6
Thanks for helping !
Ben