I have done some searching on my problem and found some discussion but no direct answer. I have a slide show flash movie that is using actionscript and loadMovie to load a set of jpgs in. My problem is the jpgs are various sizes and I need to have them centered in the movie clip they are loading to. Below is my actionscript. Can anyone help me center the loading jpgs?
Thanks… Bubba
_root.onLoad = function() {
currElement = 0;
picDataLoad = new LoadVars();
arrPics = new Array();
arrText = new Array();
folder = “images/”; // Path where photos are.
// folder = “”; // Testing Only.
picDataLoad.load(“century-productions.txt”); // Load data from text file.
picDataLoad.onLoad = function(success) {
if (success) {
arrPics = picDataLoad.pic.split(",");
arrText = picDataLoad.text.split(",");
galleryTitle = picDataLoad.title;
galleryText = arrText[0];
picPath = folder+arrPics[0];
loadMovie(picPath, “_root.mcPhoto”);
}
}
}
_root.next_btn.onRelease = function() {
if (currElement < arrPics.length - 1) {
++currElement;
picPath = folder+arrPics[currElement];
trace(picPath);
loadMovie(picPath, “_root.mcPhoto”);
galleryText = arrText[currElement];
} else {
currElement = 0;
picPath = folder+arrPics[currElement];
loadMovie(picPath, “_root.mcPhoto”);
galleryText = arrText[currElement];
}
}
_root.prev_btn.onRelease = function() {
if (currElement == 0) {
currElement = arrPics.length - 1;
picPath = folder+arrPics[currElement];
loadMovie(picPath, “_root.mcPhoto”);
galleryText = arrText[currElement];
} else {
–currElement;
picPath = folder+arrPics[currElement];
loadMovie(picPath, “_root.mcPhoto”);
galleryText = arrText[currElement];
}
}