About Drawing pad

  • zhaojany
  • Student
  • Student
  • User avatar
  • Posts: 79

Post 3+ Months Ago

I'm going to make a drawing pad ,which the user can draw a doodle .
The problem is how to implement an eraser tool .Using the bitmap class or what else?

here is an example: http://www.mykaka.cn/cgs/flashpainter2.swf
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

is the background a solid color? If so you could just "paint" over the drawing with the background color...
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

zhaojany and everyone who will view this... when I went to that site my anti-spyware utility warned me that the site is dangerous...
  • zhaojany
  • Student
  • Student
  • User avatar
  • Posts: 79

Post 3+ Months Ago

Bogey wrote:
zhaojany and everyone who will view this... when I went to that site my anti-spyware utility warned me that the site is dangerous...


but i didn't receive the warn.if it did, i'm sorry for that and the site isn't mine .
  • zhaojany
  • Student
  • Student
  • User avatar
  • Posts: 79

Post 3+ Months Ago

graphixboy wrote:
is the background a solid color? If so you could just "paint" over the drawing with the background color...

The background isn't a solid color.And i have made one by use the blendMode but when getPixel, the erased part's color is black.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

Yes, i think you need a bitmap class.
Take a look here: smudge & redraw.
Didn't use the bitmap class till now, but i think you can use it for erasing.
In fact, the erasing is just as graphixboy said, only you don't have a solid color, u have the background image which you restore, just like in the example above.
What i think is that whenever the eraser tool is involved, a new graphic is created having it's source from the background image. As you can see, in that example all the user actions (in this case mouse movement) are saved in a variable ... probably an array.
Also, for every new shape created, a new movieclip with a higher depth is created, so it will always stay above the others.
  • zhaojany
  • Student
  • Student
  • User avatar
  • Posts: 79

Post 3+ Months Ago

Thank you IceCold. And Thanks for your example . Till now i didn't make it ,but i won't quit, no matter how manny times i will try to till it is solved.And if i did it i will let u know. :)

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 15 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.