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

#1 2012-10-28 16:52:16

rubiks_cube_guy238
Scratcher
Registered: 2009-07-02
Posts: 100+

Hidden blocks in the Flash player

I decompiled the flash player, and I found these blocks in the specs:

Code:

Block name                                     Command
Stage only:
"scroll right %n"                              "scrollRight"
"scroll up %n"                                 "scrollUp"
"align scene %m.scrollAlign"                   "scrollAlign"
"switch to scene %m.scene"                     "switchScene"
"next scene"                                   "nextScene"
"hide all sprites"                             "hideAll"
"turn video %m.videoState"                     "setVideoState"
"set video transparency to %n%"                "setVideoTransparency"
All:
"when scene %m.scene starts"                   "whenSceneStarts"
"start scene %m.scene"                         "startScene"
"start scene %m.scene and wait"                "startSceneAndWait"
"scene name"                                   "sceneName" (reporter)
"scene #"                                      "backgroundIndex" (reporter)
"stop %m.stop"                                 "stopScripts"
"create clone of %m.spriteOnly"                "createCloneOf"
"x scroll"                                     "xScroll" (reporter)
"y scroll"                                     "yScroll" (reporter)
"user id"                                      "getUserId" (reporter)
"days since 2000"                              "timestamp" (reporter)
"current %m.timeAndDate"                       "timeAndDate" (reporter)
"video %m.videoMotionType on %m.stageOrThis"   "senseVideoMotion"
Sprite only:
"delete this clone"                            "deleteClone"
And then there's a lot of boring MIDI synth things...
Also, these were uncategorized:
"noop"                                         "COUNT" (reporter)
"counter"                                      "COUNT" (reporter)
"clear counter"                                "CLR_COUNT"
"incr counter"                                 "INCR_COUNT"
"for each %m.varName in %s"                    "doForLoop" (loop)
"while %b"                                     "doWhile" (loop)
"all at once"                                  "warpSpeed" (loop)
Finally, some values defined outside the array of specs:
CALL = "call"
PROCEDURE_DEF = "procDef"
GET_PARAM = "getParam"

Most of these are in the beta editor. It needs more testing, but I already tested the uncategorized ones here. The script in the project is:

when gf clicked
say (join [User ID: ] (#getUserId)) for (2) secs
say (join [Days since 2000: ] (#timestamp)) for (2) secs
for each [i v] in (10) #doForLoop
  say (i) for (0.2) secs
end of C-block
call procedure #call
procedure #test
end of C-block
define #procDef
procedure #test
end of C-block
say [Procedure was successful.] for (2) secs
The procedure (#test) block is an argument stating which procedure is called/defined. In theory it could be any normal block. This should also apply to #getParam, but I haven't tested it yet.


The glass is never half full nor half empty; it is twice as large as it needs to be.

Offline

 

#2 2012-10-28 18:11:57

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

Re: Hidden blocks in the Flash player

They're not hidden blocks. They are the blocks new in 2.0.  smile

Offline

 

#3 2012-10-28 18:28:15

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Hidden blocks in the Flash player

LS97 wrote:

They're not hidden blocks. They are the blocks new in 2.0.  smile

I don't think that all at once is...


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#4 2012-10-28 18:52:42

rubiks_cube_guy238
Scratcher
Registered: 2009-07-02
Posts: 100+

Re: Hidden blocks in the Flash player

LS97 wrote:

They're not hidden blocks. They are the blocks new in 2.0.  smile

You are correct, but these are not available in the block palette:

Code:

"noop"                                         "COUNT" (reporter)
"counter"                                      "COUNT" (reporter)
"clear counter"                                "CLR_COUNT"
"incr counter"                                 "INCR_COUNT"
"for each %m.varName in %s"                    "doForLoop" (loop)
"while %b"                                     "doWhile" (loop)
"all at once"                                  "warpSpeed" (loop)

The glass is never half full nor half empty; it is twice as large as it needs to be.

Offline

 

Board footer