Hi everyone,
I’m working on customising an open source Flash/XML gallery, and I’ve almost got it how I want, but seem to be stuck on what I think could be a very simple problem, which I’m hoping some kind soul here will be able to point out, so I can slap my forehead in a d’oh kind of way.
I’m trying to get the empty MC called ‘holder’, to instead of the default top/left corner, to load the image in it’s centre. I can get the ‘clicked’ images to do so, but it’s just the initial/first image that still loads the default way.
I’ve copy/pasted the part of the code which I think is the place to look. And I’ve RoyalBlue’d the part of the code I changed to make the ‘clicked’ image to do what I want.
imageWidth = 55;
imageHeight = 50;
[COLOR=RoyalBlue]**var cx = holder._x;
var cy = holder._y;**[/COLOR]
clickAction = function (_arg2) {
loadMovie (_arg2.large, this.holder);
this.info_mc._alpha = 0;
this.holder._alpha = 0;
[COLOR=RoyalBlue]** if (holder._width) {
holder._x = cx-holder._width/2;
holder._y = cy-holder._height/2;
}**[/COLOR]
this.info_mc.info = _arg2.txt;
this.info_mc.num = (_arg2.i + " af ") + total;
};
loadMovie (large[0], this.holder);
this.info_mc.info = txt[0];
this.info_mc.num = "1 af " + total;
i = 0;
Many many thanks in advance for any help given.