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

#1 2010-03-01 17:39:47

project1
Scratcher
Registered: 2010-02-28
Posts: 1

Huh? blocks together doesn't make sense!

What does length of mouse down equal. More what does it mean. Because it says that it is four.

Offline

 

#2 2010-03-01 18:09:12

BWOG
Scratcher
Registered: 2008-09-19
Posts: 1000+

Re: Huh? blocks together doesn't make sense!

The block < mouse down? > can only be true or false, because it is a boolean block. If the length of < mouse down? > is 4, then the answer to < mouse down? > has 4 letters, so it can only be true, because false has 5 letters. Do you get what I'm saying?

Last edited by BWOG (2010-03-01 18:09:39)

Offline

 

#3 2010-03-01 23:55:45

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Huh? blocks together doesn't make sense!

I'll make that clearer, BWOG...  smile

The length block measures how many characters is in an amount of text. If you did (length of [Scratch]), you'd get 7, since the word Scratch contains seven letters.

When you do (length of <mouse down>), it's measuring the length of what's in <mouse down>. What's in there is either "true" (when you're holding the mouse down), or "false" (when the mouse isn't down). When you did (length of <mouse down>), it was measuring the word "true". It came out with 4, of course.

Any questions?

Last edited by Jonathanpb (2010-03-01 23:56:06)


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#4 2010-03-02 11:27:49

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Huh? blocks together doesn't make sense!

project1 wrote:

What does length of mouse down equal. More what does it mean. Because it says that it is four.

Im going to look at this and explain Length of.
Length of involves strings and integer (Or words/sentences and numbers) it counts how many letters + spaces are in what has been defined in the area given.
Mouse down is weather the mouse button (Right click) has been pressed.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

Board footer