leeboycymru
Programmer
I have created a function to help load jpeg's into a movie holder depending on the name of the variable attached to the codebase.
In this case the name of the variable in the codebase is "Home", but thats not really the problem, its the calling of the function of if a variable equals to the codebase variable, see below:
So my dilema is when (_root.button == "Home"), I want to call the function, but it doesnt seem to be working.
Lee
In this case the name of the variable in the codebase is "Home", but thats not really the problem, its the calling of the function of if a variable equals to the codebase variable, see below:
Code:
if (_root.button == "Home"){
_root.onEnterFrame = function() {
var link = _root.button;
infoField._visible=true;
startLoading("HomeImage.jpg");
}
};
Code:
function startLoading(whichImage) {
loadMovie(whichImage,"imageLoader");
_root.onEnterFrame = function() {
var link = _root.button;
infoLoaded = imageLoader.getBytesLoaded();
infoTotal = imageLoader.getBytesTotal();
percentage = Math.floor (infoLoaded/infoTotal*100);
infoField.text = percentage+"%";
if (percentage>=100) {
delete this.onEnterFrame;
infoField._visible=false;
}
};
}
So my dilema is when (_root.button == "Home"), I want to call the function, but it doesnt seem to be working.
Lee