Pages: 1
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
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.
Offline
I already made a project about this.
NOTE: this only works offline.
Offline
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.
Offline
'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.
Offline
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.
Offline
That's interesting! Never knew that
Offline
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)
Offline
Look at the eventName method of all the subclasses of EventHatMorph.
Offline
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![]()
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.![]()
Also you can do
<broadcast[ 'Scratch-MouseClickEvent'
to click all of the sprites.
Offline
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![]()
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.![]()
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.
Offline
Cool! I will use this!
Offline
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
Time Traveller
Offline
TheSuccessor wrote:
Look at the eventName method of all the subclasses of EventHatMorph.
Like this?
"eventName:" has what is in the picture.
"eventName" has this:
eventName
^ scriptNameMorph eventName
Offline
As I said in my project: this does not work online.
Offline
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
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.
Offline
Pages: 1