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

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

2.5.28 to 3.4.1---Download of update package failed - Joomla! Forum - community, help and support

Your host needs to use PHP 5.3.10 or higher to run this vers - Joomla! Forum - community, help and support