This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-04-07 12:42:09

SOScratch
Scratcher
Registered: 2010-02-01
Posts: 100+

How To Make A Basic Paint Program

This is how to create a basic paint program using Scratch.

You will first need to create a sprite which is just one dot.
The dot has to be the tiniest dot you can possibly make.

The stage is not used during this tutorial.
The following scripts are all done on the sprite you just made.
That sprite will be called, "Sprite 1".

when gf clicked
clear
when gf clicked
forever
go to [mouse-pointer v]
when gf clicked
forever
if <mouse down?>
pen down
when gf clicked
forever
if <not <mouse down?> >
pen up


-SOScratch
Scratch On!

Offline

 

#2 2012-04-07 12:45:47

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: How To Make A Basic Paint Program

Or you could just do this one script inside the sprite:

when gf clicked
clear
forever
  go to [mouse-pointer v]
  if <mouse down?>
    pen down
  else
    pen up
  end

Last edited by AtomicBawm3 (2012-04-07 12:46:38)


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#3 2012-04-07 12:49:02

aryabtsev
Scratcher
Registered: 2012-02-05
Posts: 81

Re: How To Make A Basic Paint Program

Nice, but instead of 2 scripts for mouse up / down i would use:

when flag clicked
forever
if <mouse down?>
pen down
else
pen up
end
end
And also:
when flag clicked
clear
set [ghost v] effect to (100)
( this makes it be practically invisible, but, unlike "hide", fully functional)

Last edited by aryabtsev (2012-04-07 12:49:29)


http://i.imgur.com/NX7AO.jpg

Offline

 

Board footer