Help with ActionScript
Hello everybody,
I am trying to make a system that loads a JPEG when a button is pressed. That is simple. But i have 38 buttons, and the problem is that whenever a new JPEG is loaded, it is not aligned as i want it to. Whatever i do it doesn't seem to align right. I want it to be put in the center of the stage. Here is my code:
//create the buttons
pic1.whichPic = 1;
for(i = 1; i <= 37; ++i){
pic1.duplicateMovieClip("pic" + (i + 1), i);
_root["pic" + (i + 1)]._x = _root.pic1._x + (i * 14.3);
_root["pic" + (i + 1)].whichPic = (i + 1);
}
//this function is called whenever one of the buttons is released
function releace(whichPic){
loadMovie("pictures/recentPaintings/picture" + whichPic + ".jpg", "image");
image._x = horizontalMiddle - (image._width / 2);
}
But this is not working, can anyone find a solution?
Thanks a lot,
Leandro
__________________
Web Hosting by HostoSapiens - 5,95€/month
1000MB storage, 40GB bandwidth, 500 emails, PHP, MySQL, FrontPage and more
|