dav09 wrote:
WHen did http://blocks.scratchr.org launch? I havnt been active in this topic lately.
Just a few days ago.
Offline
YourLocalBlockLib wrote:
http://scratch.mit.edu/redirect/url?lin … 4v6zh2.jpg
^Back to Scratch blocks
How to download a Scratch block
Credit to nXIII for his patcher, which this code was based on.
This is a way how you can make an "import block" item in the file menu so you can download and import blocks from the library.
Beware: this feature is untested! If you want to test it for us, great, but don't use this in your production environment yet!
The Importer
Installing the block importer is the hardest (but not very hard) thing you must do in order to import blocks. Simply follow these instructions:
Step 1: Open Scratch
Step 2: Press and hold the "shift" key while clicking the loop of the "R" in the Scratch logo
Step 3: Select "turn fill-screen off" from the popup menu which shows up
Not showing up? Make sure you're clicking inside the loop of the "R"; the "logo" referred to is the one that says "Scratch" in the top-left corner.
Step 4: Click anywhere in the "white space" which shows up at the bottom and right sides of the window
Step 5: Select "open..." from the popup menu
Step 6: Select "workspace" from the subsequent popup menu
Step 7: Copy the following text and paste it into the textbox-like window with (Windows) Alt+V or (Mac) Command+V, or by clicking the "-" button above the scrollbar (appears when the mouse is over the "workspace" window) and selecting "paste (v)"Code:
'From MIT Squeak 0.9.4 (June 1, 2003) [No updates present.] on 18 June 2010 at 5:06:17 pm'! !ScratchFileChooserDialog methodsFor: 'initialization'! createBlockFileChooserFor: t1 scratchFrame _ nil. readingScratchFile _ true. list _ ScratchFilePicker new extensions: #(#block ). self removeAllMorphs. bottomSpacer delete. bottomSpacer _ nil. mainColumn addMorphBack: list. self title: 'Import Block'. list scratchInfoClient: nil. mainColumn addMorphBack: (Morph new extent: 5 @ 9; color: Color transparent); addMorphBack: newTitleBin. fileInfoColumn addMorphBack: buttonRow. self addMorphBack: shortcutColumn; addMorphBack: mainColumn; addMorphBack: fileInfoColumn! ! !ScratchFrameMorph methodsFor: 'menu/button actions'! addBlock | t1 t2 t3 t4 | t1 _ ScratchFileChooserDialog new createBlockFileChooserFor: self; type: #block. t2 _ t1 getUserResponse. t2 = #cancelled ifTrue: [^ self]. t3 _ (FileDirectory forFileName: t2) oldFileNamed: t2. t4 _ t3 contentsOfEntireFile. (ReadWriteStream on: t4 from: 1 to: t4 size) fileIn! ! !ScratchFrameMorph methodsFor: 'menu/button actions'! fileMenu: t1 | t2 | t2 _ CustomMenu new. t2 add: 'New' action: #newScratchProject. t2 add: 'Open' action: #openScratchProject. t2 add: 'Save' action: #saveScratchProjectNoDialog. t2 add: 'Save As' action: #saveScratchProject. t2 addLine. t2 add: 'Import Project' action: #importScratchProject. t2 add: 'Export Sprite' action: #exportSprite. t2 addLine. t2 add: 'Import Block' action: #addBlock. t2 addLine. t2 add: 'Project Notes' action: #editNotes. Sensor shiftPressed ifTrue: [t2 addLine. t2 add: 'Write Project Summary' action: #writeSummaryFile. t2 add: 'Write Multiple Project Summaries' action: #writeMultipleSummaries]. t2 addLine. t2 add: 'Quit' action: #quitScratch. t2 localize. #(2 4 5 6 7 8 ) do: [:t3 | t2 labels at: t3 put: ((t2 labels at: t3) copyFrom: 1 to: (t2 labels at: t3) size - 1) , ScratchTranslator ellipsesSuffix]. t2 invokeOn: self at: t1 bottomLeft + (0 @ 10)! !Step 8: Select all the text by click-and-drag or by pressing (Windows) Alt+A or (Mac) Command+A
Step 9: File in the selection by clicking on the "-" in the top left corner; choosing "more...", then "file it in"
Step 10: Shift-click the loop of the "R" in the Scratch logo again and select "save image for end-user" then select "yes" when prompted. Scratch should close, and when restarted you will see a new option in the file menu: "Import Block..."
http://scratch.mit.edu/redirect/url?lin … ibDiv2.png
^Back to Scratch blocks
You Know That Everything You Said Was ctrl + _____ Is Actually alt + _____ Right?
Offline
Speaking of that, is anyone trying to make scratch sprites downloadable through the block importer right now?
Offline
I've locked the old block library, someone brought it back from the FOURTH page. I think we have everything we need here anyway I've just noticed we've got more posts on here than the old one!
Offline
owetre18 wrote:
Now that I know squeak, I can make 2 new blocks!
Type: Both Scratch Blocks
v flip and h flip
Blockspecs
Scratch-Objects -> ScriptableSpriteMorph (class) -> block specs -> blockSpecs (under looks)Code:
('h flip' #- #hflip) ('v flip' #- #vflip)code 1 (v flip)
http://i.imgur.com/Bib6g.gif
Scratch-Objects -> ScriptableSpriteMorph (instance) -> looks opsCode:
vflip costume form: (self form flipBy: #vertical centerAt: 0 @ 0). self costumeChangedcode 2 (h flip)
http://i.imgur.com/SvimA.gif
Scratch-Objects -> ScriptableSpriteMorph (instance) -> looks opsCode:
hflip costume form: (self form flipBy: #horizontal centerAt: 0 @ 0). self costumeChangedEdit: Credit to Jens, he made the flip block, I based them off of that
Edit2: Added Images
*cough* *cough* A few updates were made after I posted this. I reposted to make it easier for the Librarians to find it without digging through 8 pages (like I did).
Last edited by owetre18 (2011-07-17 20:31:55)
Offline
sparks wrote:
I've locked the old block library, someone brought it back from the FOURTH page. I think we have everything we need here anyway I've just noticed we've got more posts on here than the old one!
Finally.
And I have it backed up to my comp, so no worries about losing it.
Offline
owetre18 wrote:
owetre18 wrote:
Now that I know squeak, I can make 2 new blocks!
Type: Both Scratch Blocks
v flip and h flip
Blockspecs
Scratch-Objects -> ScriptableSpriteMorph (class) -> block specs -> blockSpecs (under looks)Code:
('h flip' #- #hflip) ('v flip' #- #vflip)code 1 (v flip)
http://i.imgur.com/Bib6g.gif
Scratch-Objects -> ScriptableSpriteMorph (instance) -> looks opsCode:
vflip costume form: (self form flipBy: #vertical centerAt: 0 @ 0). self costumeChangedcode 2 (h flip)
http://i.imgur.com/SvimA.gif
Scratch-Objects -> ScriptableSpriteMorph (instance) -> looks opsCode:
hflip costume form: (self form flipBy: #horizontal centerAt: 0 @ 0). self costumeChangedEdit: Credit to Jens, he made the flip block, I based them off of that
Edit2: Added Images*cough* *cough* A few updates were made after I posted this. I reposted to make it easier for the Librarians to find it without digging through 8 pages (like I did).
Sorry... Queued.
~sci
Offline
Please queue...
Also, the hidden queue link can be hidden further by underlining the surrounding text.
Offline
Hardmath123 wrote:
Please queue...
Also, the hidden queue link can be hidden further by underlining the surrounding text.
I don't think we need to underline it.
If someone else feels we should, I don't mind.
NonEdit: Well, if the rest got underlined, it wouldn't look out of place.
~~ “teh almighty Scimonster„
Last edited by YourLocalBlockLib (2011-07-18 08:41:30)
Offline
I installed the block importer. But where do I download the blocks?
Offline
IHeartGaming wrote:
I installed the block importer. But where do I download the blocks?
We haven't made BLOCK files yet...
Offline
Hardmath123 wrote:
Please queue...
Also, the hidden queue link can be hidden further by underlining the surrounding text.
I don't think we're really trying to hide it, just add a little link that isn't in the way for people when they view the post, but makes certain pages faster to access for librarians
IHeartGaming wrote:
I installed the block importer. But where do I download the blocks?
I'm starting to think we should remove the link to this tutorial until we get it working as people are installing it in the hope it does work without seeing the message saying it does not!
Offline
Sparks, the link to Panther Blocks on the panther website still links to the old block library. (The link on the BlockShop page)
Offline
sparks wrote:
No... I don't think so.
Could somebody try to do that because I don't get how to download the block sprites the other way and it makes it a lot easier
Offline
Updated first post with:
Librarians
Sparks About Sparks
SSBBM About SSBBM
TheSuccessor About TheSuccessor
Pecola1 About Pecola1
Scimonster About Scimonster
Meowmeow55
This uses my API to show which librarians are online!
~Sparks
EDIT BY SCIMONSTER:
I added YourLocalBlockLib to the list too.
And who deleted all the messages?
Last edited by YourLocalBlockLib (2011-07-18 13:04:49)
Offline
jslomba wrote:
does anyone have the code for an <is %s online> block?
Lol, maybe now that we have an online checker, maybe someone could make that!
~sci
Offline
I've just added this too the Scratch Blocks Importer post:
Hopefully this will deter people from using it for now.
~sci
Last edited by YourLocalBlockLib (2011-07-18 13:23:10)
Offline
jslomba wrote:
does anyone have the code for an <is %s online> block?
BOOM! You ask you get!
$String$ is on the Scratch fora? (boolean)
|page startpos endpos refined|
page_self readFromUrl: 'http://scratch.mit.edu/forums/index.php'.
startpos_self indexOf: 'Online: </strong></dt>' startingAt: 1 in: page.
endpos_self stringLength: page.
refined_self letters: startpos through: endpos of: page.
^ refined includesSubString: t1
Offline