Hi, wondering if anyone can give me some help, ive got a some variables that help to animate movie clips on and off the stage. the code is useful because it looks for the current movie clip and animates it off the stage before the new movie clip moves on. Anyway my problem is that when i view my work using the flash preview it works fine. however, when published and viewed by opening the html version of my work, the first movie clip does not roll into place. the code that says - _root.onLoad = function “contentHome_mc” etc… should mean that the my home animation automatically moves into position when the file loads. As i said before it works fine in the flash preview, but does nothing when viewed by cliking on the html version of it. any ideas why this might be? Thanks!
below is my code, again the _root.onLoad should mean my movie clip starts when the file is loaded, any ideas why this is not the case when viewed via the html version?
var currentPage = “contentHome_mc”;
_root.onLoad = function() {
animateOn(“contentHome_mc”);
};
function animateOn(page:String) {
eval(page).gotoAndPlay(“on”);
}
function animateOff(page:String) {
eval(page).gotoAndPlay(“off”);
}
homebtn_mc.onRelease = function() {
if (currentPage != “contentHome_mc”) {
animateOff(currentPage);
animateOn(“contentHome_mc”);
currentPage = “contentHome_mc”;
}
};
kitchensbtn_mc.onRelease = function() {
if (currentPage != “contentkitchens_mc”) {
animateOff(currentPage);
animateOn(“contentKitchens_mc”);
currentPage = “contentKitchens_mc”;
}
};
contactbtn_mc.onRelease = function() {
if (currentPage != “contentContact_mc”) {
animateOff(currentPage);
animateOn(“contentContact_mc”);
currentPage = “contentContact_mc”;
}
};