Hello,
I have a script that when you press button 1-6 it loads external image and external text
when the movie plays button1 is active
what i need to know is i want button1 images in a different position,
as the images position is defined when the empty movieclip is created
even if i individually set each image position is ok,
//Create empty movieclip
_root.createEmptyMovieClip("imageHolder_mc", 1);
_root.imageHolder_mc._x = 120;
_root.imageHolder_mc._y = 0;
//Load Person1
button1.onRelease = function() {
loadVariablesNum("person1.txt", 0);
infoField._visible = true;
startLoading("person1.jpg");
};
//Load Person2
button2.onRelease = function() {
infoField._visible = true;
startLoading("person2.jpg");
loadVariablesNum("person2.txt", 0);
};
//Load Person3
button3.onRelease = function() {
infoField._visible = true;
startLoading("person3.jpg");
loadVariablesNum("person3.txt", 0);
};
//Load Person4
button4.onRelease = function() {
infoField._visible = true;
startLoading("person4.jpg");
loadVariablesNum("person4.txt", 0);
};
//Load Person5
button5.onRelease = function() {
infoField._visible = true;
startLoading("person5.jpg");
loadVariablesNum("person5.txt", 0);
};
//Load Person6
button6.onRelease = function() {
infoField._visible = true;
startLoading("person6.jpg");
loadVariablesNum("person6.txt", 0);
};
button1.onRelease ();
function startLoading(whichImage) {
loadMovie(whichImage, "imageHolder_mc");
_root.onEnterFrame = function() {
infoLoaded = imageHolder_mc.getBytesLoaded();
infoTotal = imageHolder_mc.getBytesTotal();
percentage = Math.floor(infoLoaded/infoTotal*100);
infoField.text = percentage+"%";
if (percentage>=100) {
delete this.onEnterFrame;
infoField._visible = false;
}
};
}