This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Advanced Topics
  •  » A broadcast that activates the green flag - I didn't find this myself

#1 2011-02-02 23:39:07

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

A broadcast that activates the green flag - I didn't find this myself

I was checking the Scratch Programming Wiki for vandals and I saw an edit to the Broadcast article: Broadcasting "scratch-startclicked" will activate the green flag.

Wheeee  big_smile

It's not much, but since I've never seen anyone mention it before and I thought some people might be interested, I'm posting it. Please don't give me credit for the discovery - I don't deserve any.  tongue


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

Offline

 

#2 2011-02-03 00:29:51

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

I already made a project about this.
NOTE: this only works offline.

Offline

 

#3 2011-02-03 01:28:32

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: A broadcast that activates the green flag - I didn't find this myself

When you make a receives hat with 'scratch-startclicked' it will start when you press the green flag. Weird... I wonder how someone found that.


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#4 2011-02-03 03:53:53

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

It's a shortcut written into Scratch by the Scratch team  smile  I think there are a few others though none spring to mind right now.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#5 2011-02-03 15:21:11

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

'Scratch-MouseClickEvent' will click all the sprites.
'Scratch-KeyPressedEvent' will detect if there are any key event hats, if there are it will turn red.


/* No comment */

Offline

 

#6 2011-02-03 22:04:05

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

I wonder where you find these in the System Browser (when fill screen is off and system browser is open) so I can find more if there are more.


~ihaveamac - visit ihaveamac.net

Offline

 

#7 2011-02-03 22:32:47

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

That's interesting! Never knew that  tongue


http://i.imgur.com/WBkM2QQ.png

Offline

 

#8 2011-02-03 23:51:28

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

Re: A broadcast that activates the green flag - I didn't find this myself

TheSuccessor wrote:

'Scratch-MouseClickEvent' will click all the sprites.
'Scratch-KeyPressedEvent' will detect if there are any key event hats, if there are it will turn red.

Really? Cool, how did you find out about all this?

Last edited by Jonathanpb (2011-02-03 23:51:39)


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

Offline

 

#9 2011-02-04 13:40:03

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

Look at the eventName method of all the subclasses of EventHatMorph.


/* No comment */

Offline

 

#10 2011-02-04 15:37:22

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

Jonathanpb wrote:

I was checking the Scratch Programming Wiki for vandals and I saw an edit to the Broadcast article: Broadcasting "scratch-startclicked" will activate the green flag.

Wheeee  big_smile

It's not much, but since I've never seen anyone mention it before and I thought some people might be interested, I'm posting it. Please don't give me credit for the discovery - I don't deserve any.  tongue

Also you can do
<broadcast[ 'Scratch-MouseClickEvent'
to click all of the sprites.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#11 2011-02-04 15:38:46

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

Pecola1 wrote:

Jonathanpb wrote:

I was checking the Scratch Programming Wiki for vandals and I saw an edit to the Broadcast article: Broadcasting "scratch-startclicked" will activate the green flag.

Wheeee  big_smile

It's not much, but since I've never seen anyone mention it before and I thought some people might be interested, I'm posting it. Please don't give me credit for the discovery - I don't deserve any.  tongue

Also you can do
<broadcast[ 'Scratch-MouseClickEvent'
to click all of the sprites.

Oh... Now I look at the posts, I just figured this out yesterday (except for the press flag). I am trying to see if I can make a press {key^} key block.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#12 2011-02-05 08:21:02

rocket101
Scratcher
Registered: 2009-08-21
Posts: 500+

Re: A broadcast that activates the green flag - I didn't find this myself

Cool! I will use this!

Offline

 

#13 2011-02-05 10:39:33

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

Yeah, a very useful broadcast indeed.
I already make use of it in my projects, I think I found out in the scratch connections wiki...

Here's a project that uses it for the 'play again' button, just as an example  smile
Time Traveller

Offline

 

#14 2011-02-05 12:46:08

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

TheSuccessor wrote:

Look at the eventName method of all the subclasses of EventHatMorph.

Like this?
http://dl.dropbox.com/u/11485779/Pictures/eventname.png
"eventName:" has what is in the picture.
"eventName" has this:

eventName
    ^ scriptNameMorph eventName


~ihaveamac - visit ihaveamac.net

Offline

 

#15 2011-02-05 15:17:55

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

As I said in my project: this does not work online.

Offline

 

#16 2011-02-05 15:22:55

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

scimonster wrote:

As I said in my project: this does not work online.

Yes it does. Try looking at mine, it works perfectly! (link two posts above)

Offline

 

#17 2011-02-05 16:08:33

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: A broadcast that activates the green flag - I didn't find this myself

ihaveamac wrote:

TheSuccessor wrote:

Look at the eventName method of all the subclasses of EventHatMorph.

Like this?
http://dl.dropbox.com/u/11485779/Pictures/eventname.png
"eventName:" has what is in the picture.
"eventName" has this:

eventName
    ^ scriptNameMorph eventName

SUBCLASSES.
Right-click on the class, and click 'view hierarchy'.
Then choose the more indented ones.


/* No comment */

Offline

 
  • Index
  •  » Advanced Topics
  •  » A broadcast that activates the green flag - I didn't find this myself

Board footer