Flash Question
Flash Question
Out of context: Reply #9
- Started
- Last post
- 10 Responses
- Autokern0
From what i see from the example you linke you should do this way
store all your movieClips into an array then do with this for cycle
mc_array // that is the array of your movie clips
for (var i = 0; i < mc_array.length; i++)
{
mc = array_mc[i]
if (i ==0)
{
mc._x = [your x position]
mc._y = [your y position]
} else{
prev_mc = array_mc.[i-1]
mc._x = prev_mc._x+ prev_mc._width + [distance]
if (mc._x+ mc._widt > [available width])
{
mc._y = prev_mc._y + prev_mc.height + [distance]
}else {
mc._y = prev_mc._y
}
}
}That should do
between square brackets are the numeric value you should know/determine according to what you need.Better if you put this into a function and you call it everytime you resize the stage.