[j2code]
NEW
LOAD
SAVE
*
LINK
PUBLISH
EXAMPLES
HELP
ABOUT
level 1
2
3
turtle
ARC length angle
CIRCLE radius
CLEARTEXT
HIDETURTLE
PENWIDTH width
PRINT [ . ]
RESET
SETHEADING angle
SETX x
SETXY x y
SETY y
SHOWTURTLE
maths
ARCTAN number
COS angle
INT number
RANDOM number
ROUND number
SIN angle
SQRT number
lists
BUTFIRST list
BUTLAST list
FIRST list
FPUT thing list
ITEM index thing
LAST list
LPUT thing list
SETITEM index array value
Level 1 - buttons act on turtle, and show in the command area.
<xml id="visual" speed="9" grid="false" style="display:none;"><sprite id='knHe33VonzfC2E6W' name='back ground ' x='0' y='0' homex='0' homey='0' direction='0' pendown='false' visible='true' opacity='100' costume='0'><costume uuid="GJoJdLnhsAMKxa0j" id="DTnPUG6V7CCtIVKz" name="disco" width="500" height="500" background="true" flippedHor="true"/><costume uuid="xM0lQlMhBKICtWwJ" id="K4sCAVztj7gzLpPg" name="night sky" width="500" height="500" background="true"/><blockly><xml xmlns="http://www.w3.org/1999/xhtml"><block id="17" y="-15" x="-15" type="controls_forever"><statement name="DO"><block id="50" type="sprite_costume"><field name="COSTUMETO">next</field></block></statement></block></xml><js><![CDATA[var sprite = Sprites[0];\n\n\nwhile (visual.evaluateWhileCondition(function(){ return true; }, sprite, '17')) {\n sprite.changeToNextCostume('block_id_50');\n visual.gotoEvaluateWhileCondition('17');\n}\n]]></js></blockly></sprite><sprite id='ZfLn7D6peJpBLiTz' name='girl ' x='67' y='-82' homex='67' homey='-82' direction='0' pendown='false' visible='true' opacity='100' costume='1'><costume uuid="X3qNbD4WD07qcmbj" id="m6jjhdwVPKU6AK6F" name="princess" width="170" height="170" dirOffset="180"/><costume uuid="d6ftFP9VQazSGdCg" id="m6jjhdwVPKU6AK6F" name="princess" width="150" height="150" dirOffset="180"/><blockly><xml xmlns="http://www.w3.org/1999/xhtml"><block id="1" y="-10" x="-16" type="events_arrowkeypressed"><field name="KEY">up</field><statement name="DO"><block id="2" type="draw_move" inline="false"><field name="DIR">moveForward</field><value name="VALUE"><block id="3" type="math_number"><field name="NUM">100</field></block></value></block></statement></block><block id="4" y="50" x="19" type="events_arrowkeypressed"><field name="KEY">right</field><statement name="DO"><block id="5" type="draw_turn" inline="false"><field name="DIR">turnRight</field><value name="VALUE"><block id="6" type="math_number"><field name="NUM">90</field></block></value></block></statement></block><block id="7" y="103" x="39" type="events_arrowkeypressed"><field name="KEY">left</field><statement name="DO"><block id="8" type="draw_turn" inline="false"><field name="DIR">turnLeft</field><value name="VALUE"><block id="9" type="math_number"><field name="NUM">90</field></block></value></block></statement></block><block id="10" y="166" x="8" type="events_arrowkeypressed"><field name="KEY">down</field><statement name="DO"><block id="11" type="draw_move" inline="false"><field name="DIR">moveBackward</field><value name="VALUE"><block id="12" type="math_number"><field name="NUM">100</field></block></value></block></statement></block><block id="40" y="251" x="32" type="controls_forever"><statement name="DO"><block id="90" type="sprite_costume"><field name="COSTUMETO">next</field></block></statement></block></xml><js><![CDATA[var sprite = Sprites[1];\n\n\nsprite.keyPressed('up', function(){\n sprite.moveForward(function(){return 100;}, 'block_id_2');\n}\n, 'block_id_1');\n\nsprite.keyPressed('right', function(){\n sprite.turnRight(function(){return 90;}, 'block_id_5');\n}\n, 'block_id_4');\n\nsprite.keyPressed('left', function(){\n sprite.turnLeft(function(){return (90)*-1;}, 'block_id_8');\n}\n, 'block_id_7');\n\nsprite.keyPressed('down', function(){\n sprite.moveBackward(function(){return (100)*-1;}, 'block_id_11');\n}\n, 'block_id_10');\n\nwhile (visual.evaluateWhileCondition(function(){ return true; }, sprite, '40')) {\n sprite.changeToNextCostume('block_id_90');\n visual.gotoEvaluateWhileCondition('40');\n}\n]]></js></blockly></sprite><sprite id='zr1zwtEjzN4oYm33' name='boy' x='-21' y='-150' homex='-21' homey='-150' direction='0' pendown='false' visible='true' opacity='100' costume='0'><costume uuid="PtQLt1T0eD7SvZQN" id="gHKClVecP0WlACK9" name="prince" width="200" height="200" dirOffset="180"/><costume uuid="JifxHENez1uSHpYw" id="gHKClVecP0WlACK9" name="prince" width="150" height="150" dirOffset="180"/><blockly><xml xmlns="http://www.w3.org/1999/xhtml"><block id="1" y="-28" x="-57" type="events_arrowkeypressed"><field name="KEY">up</field><statement name="DO"><block id="2" type="draw_move" inline="false"><field name="DIR">moveForward</field><value name="VALUE"><block id="3" type="math_number"><field name="NUM">6</field></block></value></block></statement></block><block id="4" y="40" x="-56" type="events_arrowkeypressed"><field name="KEY">right</field><statement name="DO"><block id="5" type="draw_turn" inline="false"><field name="DIR">turnRight</field><value name="VALUE"><block id="6" type="math_number"><field name="NUM">8</field></block></value></block></statement></block><block id="7" y="100" x="-47" type="events_arrowkeypressed"><field name="KEY">left</field><statement name="DO"><block id="8" type="draw_turn" inline="false"><field name="DIR">turnLeft</field><value name="VALUE"><block id="9" type="math_number"><field name="NUM">9</field></block></value></block></statement></block><block id="10" y="155" x="-42" type="events_arrowkeypressed"><field name="KEY">down</field><statement name="DO"><block id="11" type="draw_move" inline="false"><field name="DIR">moveBackward</field><value name="VALUE"><block id="12" type="math_number"><field name="NUM">56</field></block></value></block></statement></block><block id="24" y="244" x="-27" type="controls_forever"><statement name="DO"><block id="59" type="sprite_costume"><field name="COSTUMETO">next</field></block></statement></block></xml><js><![CDATA[var sprite = Sprites[2];\n\n\nsprite.keyPressed('up', function(){\n sprite.moveForward(function(){return 6;}, 'block_id_2');\n}\n, 'block_id_1');\n\nsprite.keyPressed('right', function(){\n sprite.turnRight(function(){return 8;}, 'block_id_5');\n}\n, 'block_id_4');\n\nsprite.keyPressed('left', function(){\n sprite.turnLeft(function(){return (9)*-1;}, 'block_id_8');\n}\n, 'block_id_7');\n\nsprite.keyPressed('down', function(){\n sprite.moveBackward(function(){return (56)*-1;}, 'block_id_11');\n}\n, 'block_id_10');\n\nwhile (visual.evaluateWhileCondition(function(){ return true; }, sprite, '24')) {\n sprite.changeToNextCostume('block_id_59');\n visual.gotoEvaluateWhileCondition('24');\n}\n]]></js></blockly></sprite></xml>
Your browser doesn't support canvas tags.
Notifications
Mark all as read
unread
x
j2message
x
j2stars
x
j2homework
x
myfiles
x
j2journal
x
Loading...