I have a movie clip on my stage that is the container for dynamically created movie clips that hold JPGs loaded in from xml. The images are spread across the x axis and are being controlled by “+” and “-” buttons to slide the images along so you can keep viewing them. To see what I mean take a look at
http://ostari.com/ronnie/airbox/
right now the plus and minus buttons just do a simple onRelease that finds the currentX and slides it 750 pixel either way.
plusBtn.onRelease = function() {
curX = _parent.projectMC._x;
_parent.projectMC.slideTo(curX-750,null,0.5,"easeOutBack");
}
minusBtn.onRelease = function() {
curX = _parent.projectMC._x;
_parent.projectMC.slideTo(curX+750,null,0.5,"easeOutBack");
}
That method I guess can work, but its not that dynamic. I want the images to be centered every time they hit the plus or minus buttons no matter what size their browser window is. Right now the images are not really centered and im not even sure if 750 is a good number to use. I would rather have a dynamic variable in there.
So basically im asking if you guys have or can think of a smart way of going about this? thanks.