Changing color of movieclip depending on the current url _root._url.indexOf

Hi,

I`m trying to set-up a script that changes the color of a movie clip, depending on the current url of the page… My code is:

var link = "http://localhost/v-v/indexSRP.php?kategorija=";
var link2 = "http://localhost/v-v/index.php?kategorija=";

if (_root._url.indexOf(link + "3") == 0) {
    var slogani = new Color("_root.slogan.pozadina.boja");
    slogani.setRGB(0xEC7702);
}
if (_root._url.indexOf(link + "4") == 0) {
    var slogani = new Color("_root.slogan.pozadina.boja");
    slogani.setRGB(0xF2DA04);
}
if (_root._url.indexOf(link + "5") == 0) {
    var slogani = new Color("_root.slogan.pozadina.boja");
    slogani.setRGB(0x97BD00);
}
if (_root._url.indexOf(link + "6") == 0) {
    var slogani = new Color("_root.slogan.pozadina.boja");
    slogani.setRGB(0x069B9A);
}
if (_root._url.indexOf(link + "7") == 0) {
    var slogani = new Color("_root.slogan.pozadina.boja");
    slogani.setRGB(0x9E774B);
}



if (_root._url.indexOf(link2 + "10") == 0) {
    var slogani = new Color("_root.slogan.pozadina.boja");
    slogani.setRGB(0xEC7702);
}

if (_root._url.indexOf(link2 + "11") == 0) {
    var slogani = new Color("_root.slogan.pozadina.boja");
    slogan.setRGB(0xF2DA04);
}
if (_root._url.indexOf(link2 + "12") == 0) {
    var slogani = new Color("_root.slogan.pozadina.boja");
    slogani.setRGB(0x97BD00);
}
if (_root._url.indexOf(link2 + "13") == 0) {
    var slogani = new Color("_root.slogan.pozadina.boja");
    slogani.setRGB(0x069B9A);
}
if (_root._url.indexOf(link2 + "14") == 0) {
    var slogani = new Color("_root.slogan.pozadina.boja");
    slogani.setRGB(0x9E774B);
}

Any kind of help is much appreciated,
Thanks

anyone?

it make more sense if you set up a variable dependant on the page it was on then tested that

ie, goto page 2

variable = 2

though what you are trying to do should in thoery be possible

Im didnt quite understand what you tried to say… Can you please explain this one is killing me…[quote=randomagain;2347498]it make more sense if you set up a variable dependant on the page it was on then tested that

ie, goto page 2

variable = 2

though what you are trying to do should in thoery be possible[/quote]

bites down on pill then foams at mouth

If games like usfine sell buy wow goldQuake and Doom defined action gaming in the gaming world, Need for Speed was the definition of racing games. Need For Speed, [url=http://www.usfine.com/Maple-Story-PowerLeveling-c-98.html]maple story power levelingor NFS for short has been around since almost the beginning of when computer gaming gained importance. [url=http://www.usfine.com/runescape-powerleveling-c-90.html]runescape power levelingNeed For Speed is [url=http://www.usfine.com/runescape-powerleveling-c-90.html]runescape powerleveling a racing game in which the player chooses cars and then races on various tracks. It was and is highly playable due to the simplicity of controls and existence of a thin progressive knack in the game. [url=http://www.usfine.com/runescape-powerleveling-c-90.html]runescape

:expressionless: