Change color style to bitmap or image
i have script makes dragable strechy string
i wondering if possible through code im using change string graphic texture graphic, not sure if great sounds fun experiment.
function item_onmousemove(event:mouseevent):void
{
//addchild(wirepick);
//startdrag(wirepick);
line.clear();
// fill color , alpha;
line.beginfill(0xffffff,1);
// line width, color , alpsha;
line.linestyle(1,0x000000,.1);
if ((mousex-targetpointx<0 && mousey-targetpointy>0) || (mousex-targetpointx>=0 && mousey-targetpointy<=0))
{
line.moveto(mousex-offset,mousey-offset);
line.curveto(mousex-offset,targetpointy-offset,targetpointx-offset,targetpointy-offset);
line.lineto(targetpointx+offset,targetpointy+offset);
line.curveto(mousex+offset,targetpointy+offset,mousex+offset,mousey+offset);
}
else
{
line.moveto(mousex-offset,mousey+offset);
line.curveto(mousex-offset,targetpointy+offset,targetpointx-offset,targetpointy+offset);
line.lineto(targetpointx+offset,targetpointy-offset);
line.curveto(mousex+offset,targetpointy-offset,mousex+offset,mousey-offset);
}
line.endfill();
}
you can use graphics' class beginbitmapfill() method bitmap fills , linebitmapstyle bitmap strokes.
More discussions in ActionScript 3
adobe
Comments
Post a Comment