Hi expert ppl
I’ve spent all day so far on this and I’m just going to have to pull over and ask directions
Can anyone help with my issue… I have a portfolio page, loading JPEGS from an XML doc. Everything works great so far but there’s just ONE THING that’s driving me NUTS.
If you have a look at:
http://www.fishgraphics.co.uk/problem/ you can see the issue… Click on the 4th thumbnail at the bottom and you can see it’s not centered (i stuck in a central white line so you can see this clearer!). Likewise, anything that has had to be reduced heightwise to fit the window, doesn’t center on ‘x’, and anything that has had to be reduced widthwise, doesn’t center in the ‘y’!
Help! What the hell have I done wrong?
Here’s my function code for setting the size position of the JPEG in the holder (imageContainer):
[INDENT]*function setPositions() {
imageContainer._width = 820;
imageContainer._yscale = imageContainer._xscale;
if (imageContainer._height > 550) {
imageContainer._height = 550;
imageContainer._xscale = imageContainer._yscale;
}
imageContainer._y = 550 - imageContainer._height;
imageContainer._x = 820 - imageContainer._width;
}*[/INDENT]…and here’s the function to call the above…
[INDENT]*function loadBitmapSmoothed(url:String, target:MovieClip) {
var bmc:MovieClip = target.createEmptyMovieClip("bmc", target.getNextHighestDepth());
var listener:Object = new Object();
listener.tmc = target;
listener.onLoadStart = function() {
attachMovie("loaderMC","loaderMC",1);
loaderMC._x = Stage.width/2;
loaderMC._y = Stage.height/2;
};
listener.onLoadProgress = function(mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
};
listener.onLoadInit = function(mc:MovieClip) {
attachMovie("clock","clock",1);
imageContainer._alpha = 0;
setPositions();
};
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(listener);
loader.loadClip(url,bmc);
}*[/INDENT](Obviously my stage size is 820 x 550px)
So, can anyone please help? I’m really struggling with this!