Hello, Reader ^^! Back again with source code. This time is Draw Image which is written in Java script programming language and Crafty extension. This shows how to draw image in Crafty screen. You need Image and 2D object in the Crafty object for image and positioning. You also need linking with an image in the folder you want. Okay, that's all I can say. Thank you for reading ^^!
Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts
Friday, April 27, 2012
[Javascript] [Crafty] Text Example
Hello, Reader ^^! Back again with source code. This time is Text Example which is written in Java script programming language and Crafty extension. This shows how to write text inside Crafty screen. You need to include 2D, Text, and DOM Crafty object first. Then you set the position and the text which want to be written. Okay, that's all I can say. Thank you for reading ^^!
Thursday, March 8, 2012
[Javascript] Ranged Random Numbers Generator
Hello, Reader ^^! Back again with source code. This time is Ranged Random Numbers Generator which is coded using Javascript. This one is easy too. This one will generate random numbers in range. Plus, it also checks whether the input is number or not and checks whether the maximum is higher than minimum. Okay, that's all I can say. Thank you for reading ^^!
Wednesday, March 7, 2012
[Javascript] Content Based Radio Choice
Hello, Reader ^^! Back again with source code. This time is Content Based Radio Choice which is coded using Javascript. This one is easy. This one will generate content based on the choice which radio button is activated. It also changes when the radio button's which is clicked changed too. Okay, that's all I can say. Thank you for reading ^^!
Radio buttons, not selected
Radio buttons, selected which generates content based on choice
[Javascript] Comment Simulation
Hello, Reader ^^! Back again with source code. This time is Comment Simulation which is coded using Javascript. This one is more tricky. I use InnerHTML approach to add new comment. The one will simulate comments which the comment comes from the comment form. Btw, I deactivated the HTML tag effect for security reason. Okay, that's all I can say. Thank you for reading ^^!
Comment form, with no comment yet
Comments and the Comment Form
Tuesday, March 6, 2012
[Javascript] Spoiler
Hello, Reader ^^! Back again with source code. This time is Spoiler which is coded using Javascript. This one is a bit tricky, but still easy to do if you get better with the javascript, css, and html. This one will show or hide content when the button is pressed. Also, the spoiler box gets bigger each time the input from the text area gets bigger too. One more thing, you can also use html tag for more effect .Okay, that's all I can say. Thank you for reading ^^!
Content is Visible
Content is Hidden
Sunday, March 4, 2012
[Javascript] Factorial
Hello, Reader ^^! Back again with source code. This time is Factorial which is coded using Javascript. This one is using recursion to get the result. It also checks whether the input is full number or not. The checking is using regexp so it would be easier to test whether it is full number or not. Okay, that's all I can say. Thank you for reading ^^!
Subscribe to:
Posts (Atom)