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

#1 2009-02-02 19:36:05

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Can it be possible to make a "mouse move" block?

Can it be possible to make a "mouse move" block?


Hai.

Offline

 

#2 2009-02-02 19:48:56

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Can it be possible to make a "mouse move" block?

i need more information. like what do u mean "mouse move"


do u mean like an if mouse moves? do whatever? or what?


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#3 2009-02-02 22:38:19

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Can it be possible to make a "mouse move" block?

it is possible, only needs two variables, old mouse Y and old Mouse X. simply have a script looking like the following:
if(oldmouseX=mouseX and oldmouseY=mousey){
mouse moving = false
} else {
oldmouseX = mousex
oldmouseY=mousey
mouse moving = false
}

Offline

 

#4 2009-02-02 22:57:08

boinoinoi
Scratcher
Registered: 2007-06-05
Posts: 500+

Re: Can it be possible to make a "mouse move" block?

yambanshee wrote:

it is possible, only needs two variables, old mouse Y and old Mouse X. simply have a script looking like the following:
if(oldmouseX=mouseX and oldmouseY=mousey){
mouse moving = false
} else {
oldmouseX = mousex
oldmouseY=mousey
mouse moving = false
}

I'm not sure what you mean. Do you mean:

forever
set [ old x ] to ( mouse x )
set [ old y ] to ( mouse y )
if < < ( old x ) = ( mouse x ) > and < ( old y ) = ( mouse y ) > >
set [ moving? ] to [ true ]
else
set [ moving? ] to [ false ]
end if
end forever

It seems you've been using a different language in the forums lately... Have you been learning javascript or actionscript lately?

Last edited by boinoinoi (2009-02-02 22:57:33)


http://i30.tinypic.com/335fpxx.jpg
"Boinoinoi is the only person on the forums that I expect to be wearing a monocle all the time behind that screen, so I'm sure being as classy as he is, he knows what he's doing"        http://myfastcounter.com/count.php?c_style=88&amp;id=1284259111http://myfastcounter.com/count.php?c_style=88&amp;id=1286068127

Offline

 

#5 2009-02-03 01:17:55

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Can it be possible to make a "mouse move" block?

boinoinoi wrote:

yambanshee wrote:

it is possible, only needs two variables, old mouse Y and old Mouse X. simply have a script looking like the following:
if(oldmouseX=mouseX and oldmouseY=mousey){
mouse moving = false
} else {
oldmouseX = mousex
oldmouseY=mousey
mouse moving = false
}

I'm not sure what you mean. Do you mean:

forever
set [ old x ] to ( mouse x )
set [ old y ] to ( mouse y )
if < < ( old x ) = ( mouse x ) > and < ( old y ) = ( mouse y ) > >
set [ moving? ] to [ true ]
else
set [ moving? ] to [ false ]
end if
end forever

It seems you've been using a different language in the forums lately... Have you been learning javascript or actionscript lately?

Can you explain the scripts. Having a hard time....


Hai.

Offline

 

#6 2009-02-03 06:10:15

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Can it be possible to make a "mouse move" block?

Action script, and no, im code works. Hold on, ill make a quick project and post it up

Offline

 

#7 2009-02-03 06:36:59

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Can it be possible to make a "mouse move" block?

http://scratch.mit.edu/projects/yambanhee_extras/403316 it has notes, so download

Offline

 

#8 2009-02-03 16:19:50

boinoinoi
Scratcher
Registered: 2007-06-05
Posts: 500+

Re: Can it be possible to make a "mouse move" block?

fg123 wrote:

boinoinoi wrote:

yambanshee wrote:

it is possible, only needs two variables, old mouse Y and old Mouse X. simply have a script looking like the following:
if(oldmouseX=mouseX and oldmouseY=mousey){
mouse moving = false
} else {
oldmouseX = mousex
oldmouseY=mousey
mouse moving = false
}

I'm not sure what you mean. Do you mean:

forever
set [ old x ] to ( mouse x )
set [ old y ] to ( mouse y )
if < < ( old x ) = ( mouse x ) > and < ( old y ) = ( mouse y ) > >
set [ moving? ] to [ true ]
else
set [ moving? ] to [ false ]
end if
end forever

It seems you've been using a different language in the forums lately... Have you been learning javascript or actionscript lately?

Can you explain the scripts. Having a hard time....

Each of the lines is a block (more or less). the brackets and parentheses are supposed to look like what they look like in scratch. I only do that because I don't like the forum scripts. And sorry, I just realized that the true and false is backwards... If you want, here's an image: http://lh5.ggpht.com/_JYBB-itklEE/SYi05fkzsBI/AAAAAAAAALI/MRfDpX0r3bw/DELETE.gif


http://i30.tinypic.com/335fpxx.jpg
"Boinoinoi is the only person on the forums that I expect to be wearing a monocle all the time behind that screen, so I'm sure being as classy as he is, he knows what he's doing"        http://myfastcounter.com/count.php?c_style=88&amp;id=1284259111http://myfastcounter.com/count.php?c_style=88&amp;id=1286068127

Offline

 

#9 2009-02-03 19:44:09

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Can it be possible to make a "mouse move" block?

yambanshee wrote:

http://scratch.mit.edu/projects/yambanhee_extras/403316 it has notes, so download

I got it.


Hai.

Offline

 

#10 2009-02-03 19:45:39

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Can it be possible to make a "mouse move" block?

fg123 wrote:

yambanshee wrote:

http://scratch.mit.edu/projects/yambanhee_extras/403316 it has notes, so download

I got it.

me 2


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#11 2009-02-03 22:42:09

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Can it be possible to make a "mouse move" block?

then im glad  smile

Offline

 

#12 2009-02-04 06:34:28

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: Can it be possible to make a "mouse move" block?

http://scratch.mit.edu/projects/bhz/362968
Mouse move sensing, and much more

Offline

 

#13 2009-02-04 18:58:04

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Can it be possible to make a "mouse move" block?

bhz wrote:

http://scratch.mit.edu/projects/bhz/362968
Mouse move sensing, and much more

That's a good project , bhz!


Hai.

Offline

 

Board footer