header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Sumit
Points:0
Posts:0

8/3/2010 12:43:15 AM

Title: Fill Color in Selected Portion


i need two control in canvas a lasso tool and a color filler where user select some portion by lasso tool and then fill color. plz help me.



1
Rex
Points: 1280
Posts:0
8/3/2010 10:30:27 AM



this is how logic will go for creating a selection area and fill it with color

on mouseDown event of canvas store

startx
starty

and on mouseUp of canvas store end values

endx
endy

Now create a movieclip add it to child of canvas a use the graphics class to create rectangle with fill color

//set fill color
myMovieclip.graphics.beginFill(oxcccccc);
myMovieclip.graphics.drawRect(startx,starty,endx,endy);
myMovieclip.graphics.endFill();


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions