all groups > flash actionscript > october 2005 >
You're in the

flash actionscript

group:

placement of duplicate mc's


placement of duplicate mc's Tyler
10/30/2005 1:44:38 PM
flash actionscript:
Hi group
I'm duplicating an mc and placing them in rows, at the moment I have an
if statement that set's them out in 2 columns running down the page,
what I'm trying to achieve or understand is how to get them to
duplicate in which ever way i want i.e 3 or 4 columns, also to achieve
some kind of paging function within flash to only show 10 records at a
time.
This is what I have so far, I'm using mx 2004
[AS]
var MyData = new LoadVars();//puts LoadVars object into the var nav
MyData.load("http://localhost/eden/scripts/Ascript/photogallery/test.txt");



MyData.onLoad = function(success){

if (success){

var amount = MyData.amount;

myY = 10;
myX = 40;
for (i=0; i < amount ; i++){

duplicateMovieClip("target", ["target"+i], i);


_root["target"+i]._y = myY

loadMovie("http://localhost/mypath/"+MyData["imageName"+i],["target"+i]);

if ((i+1) % 2 == 0){//this is the part i'm having difficulty
understanding
myY +=90;

}else{

_root["target"+i]._x =_root["target"+i]._x + 100;


}
}
}
}
[AS]
Can anyone shed some light on this or
point me in the direction of a tutorial.
Thanx in advance
Re: placement of duplicate mc's Tyler
10/30/2005 7:10:12 PM
anyone?
AddThis Social Bookmark Button