www.webdeveloper.com
Results 1 to 2 of 2

Thread: Actionscripter Learning Javascript - First script! need help

  1. #1
    Join Date
    Jul 2010
    Posts
    2

    Question Actionscripter Learning Javascript - First script! need help

    okay, so i want to print out on the console.log screen,each index of the imagArray array , at an interval of 3 seconds, can someone tell me where my mistakes are ?

    PHP Code:
    var imageArray = ["imageone""imagetwo","imagethree","imagefour","imagefive"];
    var 
    curr 0;
    var 
    timer=window.setInterval("timerFunction"3000);

    function 
    timerFunction imagesArray )
    {
        
    this.imagesArray imagesArray;
        if ( 
    curr <( imagesArray.length-1))
        {
            
            try {
            
            
    console.log"current images is : "imageArray[curr] );
         
            }
                catch (
    e
            {
            }
            
    // incremented via timer call instead of nextImage function;
           
    curr curr+1;
        }
            else
         {
             
    clearTimer(timer);
             try{
             
    console.log("current image is last image : "+imageArray[curr]);
             } 
                catch (
    e)
             {
              }
          }
     }

    prev = function (curr)
    {
        if ( 
    curr )
        {
            
    curr curr 1;
        }
     }

    next = function (curr)
    {
        if ( 
    curr imageArray.length )
        {
            
    curr curr +1;
        }
     }
    document.setInterval = (timerFunction(imageArray), 3000); 

  2. #2
    Join Date
    Jul 2010
    Posts
    2
    nevermind, ill figure it out , peace

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles