Tuesday, January 17, 2006

Timed Recursive Function : Java Script

//
// function that executes recursively but it is timed.
//
function animate() {
    k++
    if (k == 5) k = 1
    document.images[k - 1].src = imgArray2[k - 1].src
    if (k > 1)
        document.images[k - 2].src = imgArray1[k - 2].src
    else
        document.images[3].src = imgArray1[3].src
    var timeOutID = setTimeout("animate()", 1000)
} 

1 comment:

Unknown said...
This comment has been removed by a blog administrator.

Azure Storage Account Types

Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...