Help with centering images

I have read numerous threads, tried hundreds of suggestions from those threads, but still cant get my mind around how to get my images to center based on my AS (im sure that I am not referencing things correctly). The images fade fine but they still appear based on upperleft corner.
I have changed reg point, etc but still to no avail.

If someone could assist me i would be most greatful.

Scotty…I tried to use your resize example but that didnt help either.

Thanks in advance.

I have posted the AS below:


delay = 3000;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
description2 = [];
link = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
description2* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
}
firstImage();
} else {
content = “Please refresh your browser. XML was not loaded correctly”;
}
}
usedimages = [];
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“images2.xml”);
basey = 0;
basex = 0;
//*****************************************************************************
function getrandom() {
image.splice(p, 1);
p = Math.floor(Math.random()*image.length);
}
function nextImage() {
if (image.length == 0) {
getURL(“http://192.168.1.31/opiwebdev/vertmenu/main.shtml”, “_self”);
} else {
getrandom();
}

fadeOut(image[p]);
}
function firstImage() {
getrandom();
picture._alpha = 0;
fadeOut(image[p]);
}
function fadeOut(clip) {
picture.onEnterFrame = function() {

this._alpha -= 1;
if (this._alpha<1) {
preload(clip);
delete this.onEnterFrame;
}
};
}

function preload(clip) {
trace(“preload”);
picture.loadMovie(clip);
var temp = this.createEmptyMovieClip(“temp”, 9987);

temp.onEnterFrame = function() {

filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
if (filesize>4 && filesize == loaded) {
picture._x = (temp._x+temp._width/2)-temp._width;
picture._y = temp._y;
picture._alpha += 5;
}
if (picture._alpha>100) {
picture._alpha = 100;
desc_txt.htmlText = description[p];
desc_txt2.htmlText = description2[p];
slideshow();
delete this.onEnterFrame;
}
};
}
function slideshow() {
trace(“slideshow”);
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
fadeOut§;
firstImage();
} else {
nextImage();
}
}
}