hey - using the following code i am trying to get a movieclip to reposition itself prior to loading an image. Then once the new image is loaded - the other movieclip will reposition itself. Currently, the functions are cancelling each other out - b/c the one function is within an onEnterFrame - take a look:
holderHitMC.onRelease = function() {
holderMask.newY = -854;
if (holderMask._y == -854) {
loadImage();
}
};
holderHitMC.onRollOver = function() {
info_mc._visible = true;
};
holderHitMC.onRollOut = function() {
info_mc._visible = false;
};
p = 0;
this.onEnterFrame = function() {
filesize = _root.holderMC.getBytesTotal();
loaded = _root.holderMC.getBytesLoaded();
info_mc.desc_txt.text = "click here.";
preloader._visible = true;
textMask.newY = 0;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
info_mc.desc_txt.text = Math.round((loaded/filesize)*100);
} else {
preloader._visible = false;
holderMask.newY = 0;
}
// delete this.onEnterFrame;
};
// ///////////////////////////////////
function loadImage() {
if (loaded == filesize) {
holderMC.loadMovie(image[random(total)], 1);
}
}
function nextImage() {
if (loaded == filesize) {
holderMC.loadMovie(image[random(total)], 1);
}
}
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
holderMC.loadMovie(image[p], 1);
}
}
}
function firstImage() {
if (loaded == filesize) {
holderMC.loadMovie(image[0], 1);
}
}
As you can see - i have a button with an onRelease command telling the movieclip to reposition - then onEnterFrame once the file is fully loaded the movieclip should return. The problem with this is that it does not allow the movieclip to move for the onRelease b/c the onEnterFrame is saying to go to the other position. If i add the delete this.onEnterFrame the movieclip - on future loads will reposition for the onRelease fuction but will not return…
anybody, anybody, anybody…