Hey all, I’ve got a little problem.
My overall project is to create a gallery app (sort of like the mac album browser app) Anyway, all images are loaded from an xml file:
<imageSet>
<image>
<S>img1.jpg</S>
<A>IMAGE ONE ALT</A>
<T>IMAGE ONE TITLE</T>
</image>
<image>
<S>img2.jpg</S>
<A>IMAGE TWO ALT</A>
<T>IMAGE TWO TITLE</T>
</image>
<image>
<S>img3.jpg</S>
<A>IMAGE THREE ALT</A>
<T>IMAGE THREE TITLE</T>
</image>
<image>
<S>img4.jpg</S>
<A>IMAGE FOUR ALT</A>
<T>IMAGE FOUR TITLE</T>
</image>
<image>
<S>img5.jpg</S>
<A>IMAGE FIVE ALT</A>
<T>IMAGE FIVE TITLE</T>
</image>
<image>
<S>img6.jpg</S>
<A>IMAGE SIX ALT</A>
<T>IMAGE SIX TITLE</T>
</image>
</imageSet>
S = source
A = alternate text
T = title
pretty straightforward, I import it into my movie succsesfully and put the info into three arrays :
_root.srcArray
_root.altArray
_root.titleArray
This works fine, the next step is to use the loader component to display these images. this is done here:
function populateScreen()
{
for (j=0; j<imageCount; j++)
{
import mx.controls.Loader;
var curOBJ = createClassObject(Loader, "container"+j, j, {contentPath:_root.srcArray[j]});
setPos(j,curOBJ)
}
}
my problem occurs here:
function setPos(index,object)
{
object._x=500
object._y=200
}
The reassignment of the _x and _y are visually changed, but for some reason it is towards the bottom and not the middle like it should be. (1000x400px document). Something is up with the component… can anyone help me?
Thank you!