All Codes

Strings and Integers

Control Panel Items

GUI

Audio/Video

Event Handlers



Strings and Integers

Command:Print (B)
Codeskulptor: print "Hello"
EzpzJS:bprint("Hello");
EzpzJs ExplainationThis is a print command that works with last Insert Body tag
bprint notes:This is the standard print statement. You should use this when doing a print command.


Command:Printwln (B)
Codeskulptor: print "Hello"
EzpzJS:bprintwln("Hello");
EzpzJs ExplainationThis is a print command that works with last Insert Body tag with no line break
bprint notes:This is the standard print statement. You should use this when doing a print command.


Command:Print (A)
Codeskulptor: print "Hello"
EzpzJS:aprint("Hello");
EzpzJs ExplainationThis is a print command that works with First Insert Body tag
bprint notes:This is a special print statement. You should use this when doing a print command to let the user know something about your program


Command:Printwln (A)
Codeskulptor: print "Hello"
EzpzJS:aprintwln("Hello");
EzpzJs ExplainationThis is a print command that works with First Insert Body tag without a limb
bprint notes:This is a special print statement. You should use this when doing a print command to let the user know something about your program


Command:Print (Z)
Codeskulptor:print "Hello"
EzpzJSzprint(a)
EzpzJs ExplainationThis is a print command that drops your variable in the body wherever the script is
EzpzJs Notes:This should never really be used. If you know what your doing enough to use this, you should just make alterations wherever necessary. Nothing personal, just a suggestion.


Command:Printwln (Z)
Codeskulptor:print "Hello"
EzpzJSzprintwln(a)
EzpzJs ExplainationThis is a print command that drops your variable in the body wherever the script is (without a line break).
EzpzJs Notes:This should never really be used. If you know what your doing enough to use this, you should just make alterations wherever necessary. Nothing personal, just a suggestion.


Command:String Conversion
Codeskulptor:Str(4)
EzpzJs:str(4);
EzpzJs Explaination:This is a command to convert a number to a string


Command:String to Integer Converstion
Codeskulptor:int("5")
EzpzJs:int("5")
EzpzJs Explaination:This command converts a string to a number


Command:Check string for number
Codeskulptor:unknown
EzpzJs:isNumber('555');
EzpzJs Explaination:Checks to see if a string is a number


CommandRandom
Codeskulptor: random.randrange(0, 10)
EzpzJS:rand(1, 10)
EzPzJS ExplainationThe first number in range is included in the random selection, so is the last number.


Control Panel Items

CommandInput Text Box
Codeskulptor:inp = frame.add_input('My label', input_handler, 50)
EasyPeezyJS Literal:text("Label", "IdOfText", 50, "Yes", "FunctionName")
EasyPeezyJS Explaination:text(Label of Text, HTML ID of Text Box, Width, Vertical placement Yes/No, "FunctionName")
EzpzJs Notes:This does get a drop in the "InsertBody Tag"

CommandButton
Codeskulptor:frame.add_button(text, button_handler, width)
pzezJS:button('Range is [0, 100)', "upto99", "yes");
PeezyEasyJS Exlainationbutton(Text on button, function to call, Vertical? Yes or No
EzpzJs Notes:This does get a drop in the "InsertBody Tag"



GUI

Command:Timer
Codeskulptor:timer = simplegui.create_timer(500, timer_handler)
Codeskulptor:(later in script when readey to start)timer.start()
EzpzJs:TimerInterval(a, b, c, d)
EzpzJs Explainationa= TimerName, b = TimerVar, c = frequency, d = function to execute
EzPzJs Literal:TimerInterval("MyTimer", "TimerVar", 40, DrawHandler);
EzpzJs Notes:This command doesn't include a starter. Just use a condition when the time is right to start the timer. Also there is no draw handler. Just set your timer for frame frequency.


Command:Canvas
Codeskulptor:frame = simplegui.create_frame(Frame Name, Width, Height)
Codeskulptor Literal:frame = simplegui.create_frame('Testing', 100, 100)
Codeskulptor Later in Code:frame.start
CodeSkulptor Note:In Codeskulptor, calling a window (called frame) is creating a canvas
-------
EzpzJs:canvas(name, width, height);
EzpzJs Literal:canvas("myCanvas", 500, 500);
EzpzJs Note:There is no need to call a start to the frame or canvas, it appears in the first html window, but you must set a color to the frame or else your animations will look funky.


Command:Set Canvas Background
Codeskulptor:frame.set_canvas_background(color)
Codeskulptor Literal:frame.set_canvas_background('Red')
EzpzJs:canvasColor("myCanvas", "Green");


Command:Square on Canvas
Codeskulptor Explain:canvas.draw_polygon([[pos1], [pos2], [pos3], [pos4]], line_width, 'line color', 'fill color')
Codeskulptor Literal:canvas.draw_polygon([[90, 70], [80, 40], [70, 90], [70, 70]], 12, 'Yellow', 'Orange')
EzpzJs Explain:canvasQuad(name, color, pos1[0], pos1[1], pos2[0], pos2[1]);
EzpzJs Literal:canvasQuad("myCanvas", "Grey", 0, 0, 400, 400);
Notes:Codeskulptor can do triangles and quads in one command.


Command:Triangle On Canvas
EzpzJs Literal:canvasTriangle("myCanvas", "Red", XPos, YPos, 100, 100);
EzpzJs Explaination:canvasTriangle(Canvas Name, Color of triangle, x position, y position, length of base, height of triangle)


Command:Line on Canvas
Codeskulptor Explain:canvas.draw_line(point1, point2, line_width, line_color)
Codeskulptor Literal:canvas.draw_line((10, 20), (30, 40), 12, 'Red')
EzpzJs Explain:canvasLine(name, color, width, x1, y1, x2, y2)
EzpzJs Literal:canvasLine("myCanvas", "Green", 10, 0, 0, 500, 500);


Command:Draw a circle on canvas
Codeskulptor Explaination:canvas.draw_circle(center_point, radius, line_width, line_color, fill_color)
Codeskulptor Literal:canvas.draw_circle((50, 50), 20, 5, 'Blue', 'White')
EzpzJs Explaination:canvasCircle(name, radius, line color, fill color, line width, center x, center y);
EzpzJs Literal:canvasCircle("myCanvas", 80, "Orange", "Yellow", 8, 160, 300);


Command:Place a small point on canvas
Codeskulptor Explaination:canvas.draw_point(point, color)
Codeskulptor Literal:canvas.draw_point((10, 10), 'Green')
EzpzJs Explaination:canvasPoint(name, color, x1, y1);
EzpzJs Literal:canvasPoint("myCanvas", "Green", 250, 46);


Command:Draw text on canvas
Codeskulptor Explaination:canvas.draw_text(text, point, font_size, font_color, font_face)
Codeskulptor Literal:canvas.draw_text('C', (80, 50), 12, 'Gray', 'serif')
EzpzJs Explaination:canvasText(name, text, color, size, fontnumber, x, y);
EzpzJs Literal:canvasText("myCanvas", "Purple", "Purple", 35, 1, 225, 100);


Command:Load Image
Codeskulptor Explaination:simplegui.load_image(URL)
Codeskulptor Literal:image = simplegui.load_image('http://commondatastorage.googleapis.com/codeskulptor-assets/gutenberg.jpg')
EzpzJs Explaination:ImageLoad(image);
EzpzJs Literal:ImageLoad(image.png);


Command:Simple Image Drop
Codeskulptor:No Equivalent
EzpzJs Explaination:canvasSimpleImage(name, picturelocation, x placement, y placement);
EzpzJs LiteralcanvasSimpleImage("myCanvas", ww, 400, 350);


Command:Complex Image Placement
Codeskulptor Explaination:canvas.draw_image(image, center_source, width_height_source, center_dest, width_height_dest, rotation)
Codeskulptor Literal:canvas.draw_image(image, (1521 // 2, 1818 // 2), (1521, 1818), (40, 70), (100, 100), 2)
Codeskulptor Note:the last variable called rotation is optional
---------
EzpzJs Explaination:canvasComplexImage(name, picturelocaction, x center of source, y center of source, wid of clip, ht of clip, x placement, y place, wid of place, ht of place, roatation)
EzpzJs Literal:canvasComplexImage("myCanvas", yy, 36, 48, 72, 96, 36, 48, 72, 96, 0.5);
EzpzJs Note:Rotation is not optional; just mark 0 for normal.


Command:Load Sprites
EzpzJs Explaination:This calls in a special timer for handling sprites
EzpzJs Literal:SpriteStart();


Audio/Video

Command:Load Sound
Codeskulptor Explaintion:simplegui.load_sound(URL)
Codeskulptor Literal:simplegui.load_sound('http://commondatastorage.googleapis.com/codeskulptor-assets/Epoq-Lepidoptera.ogg')
EzpzJs Explaination:soundload(name, source);
EzpzJs Literal:soundload("mySound", "hello.mp3");


Command:Play Sound
Codeskulptor Explaination:Name_of_Sound.play()
Codeskulptor Literal:sound.play()
EzpzJs Explainationsoundfire(NameOfSound);
EzpzJs Literalsoundfire("MySound");


Command:Pause Sound
Codeskulptor Explaination:Name_Of_Sound.pause()
Codeskulptor Literal:sound.pause
EzpzJs Explaination:soundfreeze(Name_of_Sound)
EzpzJs Literal:soundfreeze("mySound");


Command:Rewind Sound
Codeskulptor explaination:sound_name.rewind()
Codeskulptor Literal:sound.rewind()
EzpzJssoundrewind(name_of_file)
EzpzJssountsetvol("name_of_file")


Command:Set Volume of Sound
Codeskulptor explaination:name_of_sound.set_volume(volume)
Codeskulptor Literal:sound.set_volume(volume)
EzpzJs Explaination:soundsetvol(name_of_sound, desired_volume)
EzpzJs Literal:soundsetvol("mysound", 0.5)
EzpzJS Notes:Sound volume can be anywhere from 0 to 1 (usually in increments of tenths).


Command:Load Movie
Codeskulptor:No Equivalent
EzpzJs Explaination:movieload(name, source, type[1, 2, 3])
EzpzJs Literal:movieload("mymovie", "MyVideo.mp4", 1);


Command:Play Movie
Codeskulptor Explaination:No Equivalent
Codeskulptor Literal:No Equivalent
EzpzJs Explainationmoviefire(NameOfSound);
EzpzJs Literalmoviefire("MyMovie");


Command:Pause Movie
Codeskulptor Explaination:No Equivalent
Codeskulptor Literal:No Equivalent
EzpzJs Explaination:moviefreeze(Name_of_Movie)
EzpzJs Literal:moviefreeze("myMovie");


Command:Rewind Movie
Codeskulptor explaination:No Equivalent
Codeskulptor Literal:No Equivalent
EzpzJsmovierewind(name_of_file)
EzpzJsmoviesetvol("name_of_file")


Command:Set Volume of Movie
Codeskulptor explaination:No Equivalent
Codeskulptor Literal:No Equivalent
EzpzJs Explaination:moviesetvol(name_of_sound, desired_volume)
EzpzJs Literal:moviesetvol("mysound", 0.5)
EzpzJS Notes:Movie volume can be anywhere from 0 to 1 (usually in increments of tenths).




Event Handlers

Command:Listen for Key Press Down
Codeskulptor Explaination:frame.set_keydown_handler(key_handler)
Codeskulptor Literal:frame.set_keydown_handler(key_handler)
EspzJs Explaination:window.onkeydown = Name_of_Function;
EspzJs Literal:window.onkeydown = KeydownControl;
EzpzJs Notes:This command is not from EzpzJs. It is the correct direct Javascript Command. I just don't see a reason to tamper with this formula. It is also interesting to note that we don't pass a variable in to the function. This means that the variable might be the key press itself


Command:Listen for Key Release
Codeskulptor Explaination:frame.set_keyup_handler(key_handler)
Codeskulptor Literal:frame.set_keyup_handler(key_handler)
EzpzJs Explaination:window.onkeyup = Name_of_Function;
EzpzJs Literal:window.onkeyup = KeyupControl;
EzpzJs Notes:This command is not from EzpzJs. It is the correct direct Javascript Command. I just don't see a reason to tamper with this formula.


Command:Key Finder
EzpzJs Only: button = KeyFinder(e.keyCode);
button will return the value of the key in the function of the key up or down


Command:Listen for a press of the mouse
Codeskulptor Explaination:frame.set_mouseclick_handler(functionName)
Codeskulptor Literal:frame.set_mouseclick_handler(mouse_handler)
EzpzJs Explaination:Please comment on youtube if you can explain this!
EzpzJs Literal:myCanvas.addEventListener("mousedown", MouseDown, false);


Command:Canvas Click finds for mouse press
EzpzJs Only:canvas_x = event.pageX;
canvas_y = event.pageY;


Keys to listen for:
Special Keys
"Backspace", "Tab", "Enter", "Shift", "Ctrl", "Alt", "Space", "Page Up", "Page Down", "End", "Home", "Left", "Up", "Right", "Down", "Insert", "Delete"
Number Keys
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"
F Keys
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"