The snippet below takes one clip and duplicate it in rows and columns
- simple stuff.
_root.attachMovie("seat",seat_mc,_root.getNextHighestDepth(),{_x:-1000,_y:0});
function createSeats (xSpacing:Number,ySpacing:Number,rows:Number,cols:Number) {
var xSpacing:Number = xSpacing;
var ySpacing:Number = ySpacing;
var xStart:Number = 10;
var yStart:Number = 30;
var v:Number = 0;
var i:Number = -1;
// specified by the user
var rows:Number = rows;
var cols:Number = cols;
while (++i < cols) {
var j:Number = -1;
while (++j < rows) {
++v;
var name:String = "seat" + v;
_root[seats].duplicateMovieClip (name, v);
_root[name]._x = xStart + i * xSpacing;
_root[name]._y = yStart + j * ySpacing;
}
}
}
createSeats(10,10,7,20);
Now rather than the final result being duplicated in rows and cols
like a square or a box, I'd like to let the user decide the amount of
angle to the left or right , so as to give it a "perspective" or
skewed look - if that makes any sense.
Please see the attached gifs for a better explanation.
Any help appreciated.
/Johan
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders