I’m stuck, wondering if you can help. I’m trying to just make an image center horozontally in the page when I addChild it.
I figure the formula I need is the width of the of the image deducted from the width of the page divided by two… but I don’t know how to make that into a formula, as in I don’t know how to represent the size of the newly added child in the formula. Any help?
Thanks a lot. Code is below.
var loadMyImage:Loader = new Loader();
var routeMyImage:URLRequest = new URLRequest(“image.jpg”);
loadMyImage.load(routeMyImage);
imageViewer.addChild(loadMyImage);
loadMyImage.x = (pagesize-sizeOfAddedChild)/2;