Hey all,
I wanna ask, if it's possible to make that with the action attachmovie all the movie clips don't show up all at once, but each by each from up to down. Thanks for any idea.
Printable View
Hey all,
I wanna ask, if it's possible to make that with the action attachmovie all the movie clips don't show up all at once, but each by each from up to down. Thanks for any idea.
Hi,
Maybe this?
It is not working somehow to me...
You need to set the totalbuttons variable ie:
totalbuttons = 5;
etc.
It is working, but I have explained that in a wrong way. I need them to view from left to right and from up to down. Sorry...
.
still not working...
Can someone help me please???
It sounds like you want a grid. If so, the following script will do it.
code:
var myInterval;
totalXbuttons = 7; // total columns
totalYbuttons = 5; // total rows
leftMargin = 40;
xSpacing = 20;
topMargin = 40;
ySpacing = 20;
kTiming = 50; // milliseconds between buttons
totalButtons = totalXbuttons * totalYbuttons;
function myFunction(i)
{
clearInterval(myInterval);
var x = i % totalXbuttons;
var y = Math.floor(i/totalXbuttons);
var item = attachMovie("btn", "btn"+i, i);
item._x = leftMargin + x*xSpacing;
item._y = topMargin + y*ySpacing;
if (++i < totalButtons)
{
myInterval = setInterval(myFunction, kTiming, i);
}
}
myFunction(0);
Good work! I was waiting for that couple of hours.
Thank you verry much!!!