in short, i am using the following circle shaped movieclips as vertices parameter(vector.) of drawTriangles method of graphics class. and using the method on the second picture.
now the thing is first 6 points are working fine but after that all the consecutive points dont make any difference.
okay here is the code. m skipping circle-shaped-movieclips-drag-and-move-part
//cape is instance name of movieclip
//cape width and height
var cWidth:Number = cape.width;
var cHeight:Number = cape.height;
var verteces:Vector.<Number> = new Vector.<Number>();
var indeces:Vector.<int> = new Vector.<int>();
var uvtData:Vector.<Number> = new Vector.<Number>();
//populating parameters of draw triangels
var point:Point = new Point();
for(var i:int = 1; i<=capeSkel.numChildren; i++)
{
point.x = capeSkel["pt"+i].x;
point.y = capeSkel["pt"+i].y;
verteces.push(point.x,point.y);
uvtData.push(point.x/cWidth,point.y/cHeight,1);
}
indeces.push(0,10,5, 0,1,10, 1,2,10, 2,10,7, 5,6,10, 6,7,10, 2,11,7, 2,3,11, 3,4,11,
4,11,9, 7,8,11, 8,9,11);
var capeBmd:BitmapData = new BitmapData(cWidth, cHeight, true);
capeBmd.draw(cape);
var sprite:Sprite = new Sprite();
addChild(sprite);
sprite.x = 0;
sprite.y = 260;
//this function is called everytime those movieclips are repositioned
function updateVerteces()
{
var tempVerteces:Vector.<Number> = new Vector.<Number>();
var point:Point = new Point();
//capeSkel is the instance name of circle-shaped moveiclip's parent
for(var i:int = 1; i<=capeSkel.numChildren; i++)
{
point.x = capeSkel["pt"+i].x;
point.y = capeSkel["pt"+i].y;
tempVerteces.push(point.x,point.y);
}
for(var k:int = 0; k<capeSkel.numChildren; k++)
{
verteces[k] = tempVerteces[k];
}
}
function renderView()
{
sprite.graphics.clear();
sprite.graphics.beginBitmapFill(capeBmd);
sprite.graphics.drawTriangles(verteces,indeces,uvtData);
sprite.graphics.endFill();
}