Results 1 to 2 of 2

Thread: javascript set interval

  1. #1
    Join Date
    Apr 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default javascript set interval

    Hi All,

    I have three swfs and i need to load them one by one with time interval inside div and this is my code.


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <title>SWFObject</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="swfobject.js"></script>
    <script lang="javascript" type="text/javascript">
    var swfObjs=['loadtext.swf','intro_page.swf','welcome.swf'];
    var counter=0;
    var timer = 12;
    function nextSwf()
    {
    if (counter == swfObjs.length-1)
    {
    counter = 0;
    }
    else
    {
    counter++;
    }
    swfobject.embedSWF(swfObjs[counter], "movieContainer", "300", "120", "9.0.0", "100",(timer));
    }

    </script>
    </head>
    <body onload='nextSwf();'>


    <div id="movieContainer"


    </div>

    </body>
    </html>
    pls help.... on how to set the interval for loading the swfs with time gap.

    Thanks in advance
    Last edited by Nirupamavinoth2; 04-03-2012 at 04:26 AM. Reason: code missing

  2. #2
    Join Date
    Mar 2011
    Posts
    2,171
    Thanks
    61
    Thanked 121 Times in 117 Posts
    Blog Entries
    4

    Default

    Check out this site.

    Hope it helps
    Keyboard1333
    Last edited by keyboard; 04-03-2012 at 09:18 AM. Reason: Sentances should start with a capital.

Bookmarks

Posting Permissions

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