Monday, 17 June 2019

Basic Animation with javascript

Category : Javascript
Buat animasi mengunakan javascript? apa mungkin? sulit sih.. soalnya klo yang tahu bahasa c
di sana kan klo mo buat animasi harus pake delay (perintah untuk menunda program beberapa saat) tapi di javascript ga ada perintah delay tuh.. adanya perintah yang laen yaitu setTimeout(callback_function,delay_time). klo pernah mengunakan open gl pasti ga asing cara pengunaannya. function ini di gunakan secara rekursif.
langsung saja, cara pake sederhananya :

function coba_settimeout()
    alert('ini adalah coba');
    // artinya kita akan memangil function coba_settimeout 5 detik sekali
// pemangilan function awal

nah itu cara pake dari settimeout, bisa di pake untuk macam2 sih, misalnya yang pernah saya gunakan untuk hal dalam memberikan waktu user untuk log out, jadi dalam 5 menit klo user tidak melakukan aksi apa pun di web kita, kita memberikan alert bahwa sesi anda telah habis.

aku punya contoh program bola pantul yang di buat mengunakan javascipt, konsepnya berbeda dengan kita membuat bola pantul di bahasa c. bisa lihat di sini
dan 1 hal yang perlu di inget, javascript jalannya bukan line perline. artinya dia tidak menungu function yang satu selesai baru melakukan function selanjutnya.

Like this articles? share it with Share With FacebookFacebook
<< Back
3 Comment | 3706 hits | Posted by Callrid at 2007-10-26 09:37:50

Related Read

Add Comment
Name :
Web :
Comment :

Code :

Other Source
A Practical Guide On Complete Multivitamins
Many of us have a hard time deciding what the best multivitamin is for us. This is completely confusing and difficult especially when there are so many bottles to scan in the various aisles of the...

High Blood Pressure
The nutritional benefits of low-fat dairy products are well known for ages. The latest studies show that the ingredients of dairy products - some combination of milk proteins are effective and...

Welcome To - Quality Luxury Replica Vacheron Constantin Watches At Affordable Price
When entering our online store at, you are given an unique opportunity to choose among a wide selection of famous Replica Watches and Replica handbags such as Replica Vacheron...

Ebook Marketing Tips
A great way to have a product to sell on the Internet is an e-book which almost anyone can create. There is no longer any need for delaying with the simple process detailed below. If you are afraid...

Tactical Asset Marketing
Asset Management Different Asset Allocation Strategies Asset marketing is the process of dividing a portfolio into major asset categories such as cash, stocks, real estate, or...

Shout Box
2019-04-10 21:32:43 
2019-02-26 22:20:45 

2016-11-24 08:56:05 
Pembicara Internet M
Website yagn bagus
2016-11-24 08:40:45 
Produsen Mukena
Good Website
2016-04-05 20:44:45 
Belanja Alat ukur
Belanja Alat ukur dan Thermal Camera Hanya di

Site Partners

Search Articles

Web Statistic
No Visitor :
Today Visitor :
Online Visitor :
what is my ip address? Page Rank Checker

< Jun 2019 >

Increase Page Rank

Last Modified 08-November-2011, 23:21:04 pm Created 2006-2012 by Anton Ongsono
All rights reserved