What is wrong with this code please?

Please I need help I don’t know what else to try.

before converting to As 2.0 from as 1.0 and fp 6 this code laoded an image just fine

see code:



if (_root.templatedir ne "") {
    loadMovie(_root.templatedir add "/" add _root.category add "/" add _root.theme add ".swf", "loadmoviebottom");
} else {
    if (_root.templatedir1 ne "") {
        loadMovie(_root.templatedir1 add "/" add _root.category add "/" add _root.theme add ".swf", "loadmoviebottom");
    } else {
        loadMovie(theme add ".swf", "loadmoviebottom");
    }
}


after converting to as 2.0 and fp 8 and 9 the code wont load anymore

see code:



if (_root.templatedir != "") {
    loadMovie(_root.templatedir + "/" + _root.category + "/" + _root.theme + ".swf", "loadmoviebottom");
} else {
    if (_root.templatedir1 != "") {
        loadMovie(_root.templatedir1 + "/" + _root.category + "/" + _root.theme + ".swf", "loadmoviebottom");
    } else {
        loadMovie(theme + ".swf", "loadmoviebottom");
    }
}


I’ve experimrnted with both “==” operator and 'ne" and nothing happens.

the only way that I can get the images to load i if I publish in flash player 6.

please what is wrong with this code

thanks in advance

Not sure, however I noticed…


if (_root.templatedir != "") {
    loadMovie(_root.templatedir + "/" + _root.category + "/" + _root.theme + ".swf", "loadmoviebottom");
} else {
    if (_root.templatedir1 != "") {
        loadMovie(_root.templatedir1 + "/" + _root.category + "/" + _root.theme + ".swf", "loadmoviebottom");
    } else {
        loadMovie(**theme** + ".swf", "loadmoviebottom");
    }
}

Try changing that to _root.theme

I dont know if this will work

but shouldnt it be like


loadMovie([theme + ".swf", "loadmoviebottom");

// OR

loadMovie(eval(theme + ".swf"), "loadmoviebottom");

it’s just a load image?
like put an image on the screen?

_root.createEmptyMovieClip(“emp”,-1);
_root.emp.attachMovie(“clip”,“clip”+1,1);
var pill:MovieClip = _root.emp[“clip”+1];
pill._x = 550/2;
pill._y = 400/2;

-1 is bad :stuck_out_tongue:

**if (_root.templatedir != “”) { **

doesn’t make sense twice in a row

var root:MovieClip = this;
loadMovie((root.templatedir1 ? (root.templatedir1 + "/" + root.category + "/")  : "") + root.theme + ".swf", "loadmoviebottom");

Without seeing your file, nothing seems wrong - however, try to avoid referencing the _root