I think it is time to share some secret technics.
Here is an example of a custom class Splitter which split a clip into little pieces.
You can then play with all the little pieces, change their position or color or whatever ...
Feel free to use this class the way you want in any projects, just send me a link to the stuffs you did with it and i'll be an happy cat.
How to use it:
var splitter:Splitter = new Splitter(sourceMc, piecesContainer);
var pieces:Array = splitter.split(10);
// where 10 is the number of pieces (make rectangular pieces if the image is a rectangle)
OR
var pieces:Array = splitter.splitBySliceSize(15);
// where 15 is the size in pixels of the pieces (make square pieces)
//then do something with the array ...
source + simple example
No comments:
Post a Comment