How to use a makeshift "backpack" function in mBlock


#1

One of the missed features of mBlock from Scratch is the ability to use the “backpack” to copy and paste. I stumbled upon a way to save a sprite full of code and then copy to back into another program. I am building sprites that perform a certain function (forward, turn, etc) and saving them localy as a file that can be imported back into another program (and I don’t have to make it from scratch (ha, pun intended). Instructions are below (I can’t get my screen shots to work today but I will discribe it as best as I can).

  1. Build your progam in a Sprite. Give it a name by right clicking on the sprite.
  2. Right click again on the sprite and you should see the menu (as above) but pick the “save to local file” selection. Make sure you give it a good name so you know what the program entails. Also make sure you know where you have saved the file as it will be needed for the next step.
  3. Open a new program. Open a new sprite from the “file with upward arrow” icon. Find your file. It will have a .sprite2 extension on the end of the file. It should open into mBlock as a new sprite with all of the code you made from before.
  4. Pat yourself of the back that you do not have to recreate all the hard work you did before.

Let me know if this works for others and if anyone else has a nice short cut for mBlock, please let us know.

Happy Coding.

Max