Problem loading pics into right position

I have posted numerous times learning new things to get my photo gallery working and i’m almost done, but i still have one problem. I have been trying to find out how to load the photos into the center of a movie from the center of the photos. I just got this code which makes the photos load directly into the center of the stage, but i was wondering if there is code to load the movies directly into a certain movie clip. At the bottom is the new code that i just got, and the file is also attached if anyone would like to look at that and help me out. I want to get the photos so that when they load they appear in the center of the cone movie clip.

var absX = Stage.width/2.;
var absY = Stage.height/2.;
this.pathToPics = “”;
this.pArray = [“scarlet1.jpg”, “scarlet2.jpg”, “scarlet3.jpg”];
this.fadeSpeed = 20;
this.pIndex = 0;
//loading en setting x/y for first picture
loadMovie(this.pathToPics+this.pArray[0],; = absX-276;//first picture = 178 width/2 = absY-238;//first picture = 277 height/2
MovieClip.prototype.changePhoto = function(d) {
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
this.onEnterFrame = fadeOut;
MovieClip.prototype.fadeOut = function() {
if (>this.fadeSpeed) { -= this.fadeSpeed;
} else {
MovieClip.prototype.loadPhoto = function() {
var p =;
p._alpha = 0;
this.onEnterFrame = loadMeter;
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l =;
t =;
if (t>0 && t == l) {
this.onEnterFrame = fadeIn; =; =;
} else {
MovieClip.prototype.fadeIn = function() {
if (<100-this.fadeSpeed) { += this.fadeSpeed;
} else { = 100;
this.onEnterFrame = null;
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
} else if (Key.getCode() == Key.RIGHT) {

Any help would be much appreciated.

here’s the file

I haven’t had a good look at your fla yet (need to make some dummy scarlet images) but try moving the registration point of your “photo” instance to the top left hand corner then repositioning it on the stage. The top left hand corner of loaded clips align the with registration point of the target clip or the top left of the stage (if it is loaded into a level instead of a target clip).

onestepaway, is this your way of working??
Starting a thread (yesterday), getting an answer, deleting it and start another thread (which continued on the answer I gave you)?

Yesterday was the last time I helped you


*Originally posted by scotty *
Yesterday was the last time I helped you

scotty:m: **

onestepaway, i think he’s mad.