ciao a tutti

ho questo script che, a seconda dell'url, mi muove il movieclip (il movieclip e' una navigazione)

per pigliare la condizione gli ho fatto tirare fuori la substring, in questo modo so in che cartella mi trovo del sito (e quindi non devo creare una condizione per ogni indizzo)

se lo posto e' perche' ovviamente non mi funge...

onClipEvent (load) {

posizione=_url;
if(posizione.substring(26,32)=="index."){ //index
_x = endX = 0;
_y = endY = 27;
}
else if(posizione.substring(26,32)=="what-i"){ //what-is-seo
_x = endX = -500;
_y = endY = 27;
}
else if(posizione.substring(26,32)=="what-w"){ //what-we-do
_x = endX = 0;
_y = endY = 5;
}
else if(posizione.substring(26,32)=="case-s"){ // case-studies
_x = endX = -500;
_y = endY = 5;
}
else if(posizione.substring(26,32)=="about-"){ // about-us
_x = endX = 0;
_y = endY = -17;
}
else if(posizione.substring(26,32)=="career"){ //careers
_x = endX = -500;
_y = endY = -17;
}
else {
_x = endX = 0;
_y = endY = 27;
}
div = 5;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/div;
_y += (endY-_y)/div;
_root.home.onRollOver = function() {
endX = 0;
endY = 27;
};
_root.whatisseo.onRollOver = function() {
endX = -500;
endY = 27;
};
_root.whatwedo.onRollOver = function() {
endX = 0;
endY = 5;
};
_root.casestudies.onRollOver = function() {
endX = -500;
endY = 5;
};
_root.aboutus.onRollOver = function() {
endX = 0;
endY = -17;
};
_root.careers.onRollOver = function() {
endX = -500;
endY = -17;
};
}

sbaglio forse a dire la posizione della sottostringa?!

il dominio secondario e' composto da 10 caratteri, + il dominio primario .com, quindi http://www.xxxxxxxxxx.com/