2 Replies - 1259 Views - Last Post: 30 May 2009 - 12:47 PM

#1 reyco1  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 43
  • Joined: 20-March 05

Freehand drawing

Posted 26 March 2005 - 02:38 AM

Description: all you have to do is place the script on the first fram of the movie and run it :Dsimply hold douwn on the mouse button and drag to draw lines!
init();
stop();
//
function init() {
   initDrawing();
   initMouse();
}
function initDrawing() {
   createEmptyMovieClip("draw_mc", 10);
   draw_mc.lineStyle(2, 0x000000);
   createEmptyMovieClip("temp_mc", 20);
}
function initMouse() {
   mouseMoveListener = new Object();
   mouseMoveListener.onmousemove = function() {
      mouseMoveEvent();
   };
   //
   mouseClickListener = new Object();
   mouseClickListener.onmousedown = function() {
      mouseDownEvent();
   };
   mouseClickListener.onmouseup = function() {
      mouseUpEvent();
   };
   Mouse.addListener(mouseClickListener);
}
function mouseDownEvent() {
   draw_mc.moveTo(_xmouse, _ymouse);
   Mouse.addListener(mouseMoveListener);
}
function mouseUpEvent() {
   temp_mc.clear();
   Mouse.removeListener(mouseMoveListener);
}
function mouseMoveEvent() {
   // Remove any previous drawing
   temp_mc.clear();
   // Draw dot at End Point
   temp_mc.lineStyle(6, 0x00ff00);
   temp_mc.moveTo(_xmouse, _ymouse);
   temp_mc.lineTo(_xmouse + 0.5, _ymouse);
   // Draw line segment
   draw_mc.lineTo(_xmouse, _ymouse);
}



Is This A Good Question/Topic? 0
  • +

Replies To: Freehand drawing

#2 VijaySofist  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 10-January 08

Re: Freehand drawing

Posted 10 January 2008 - 09:53 PM

If This is available in Javascript or if it is Known how to use this in the ASP.Net code then it will be very useful for me.
Was This Post Helpful? 0
  • +
  • -

#3 adam.dod  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 30-May 09

Re: Freehand drawing

Posted 30 May 2009 - 12:47 PM

can u send vidio how to di this in flash8 [email protected] please send me
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1