• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Timer (gallery-timer) on cdn

    Last Updated: 10/16/12
    + 0 -

    Anthony Pipkin

    YUI Developer

    See 28 more by this user.

    Created: 04/6/10
    Last CDN Push: 07/25/12
    Build Tag: gallery-2012.07.25-21-36
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.7.3
    Free for use.

     
    Moving to 'gallery-xarno-timer' and Y.Xarno.Timer

    Modelled after Flash ActionScript 3's Timer object, creates a timer with the ability to start, pause, resume, and stop; listen for events on such actions; and have an explicit callback at each interval of the timer. The timer loops continuously by default or if count is set to zero (0).

    Configuration


    • callback - function fired when timer interval is reached
    • length - Time in milliseconds between intervals
    • repeatCount - Number of times the Timer should fire before it stops. Zero (0) is infinite.
    • start - (readonly) Timestamp Timer was started
    • startDelay - Time in ms to wait until starting after start() has been called
    • status - (readonly) Current status of the timer (stopped, started, paused)
    • step - (readonly) Number of times the Timer has looped
    • stop - (readonly) Timestamp Timer was stopped or paused
    • timer - (readonly) Timer id used during stop()
    • Tags:
    • apipkin
    • timer
    • pause
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Code Sample

    <script src="http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2012.07.25-21-36'
    }).use('gallery-timer', function(Y) {
     
        var t = new Y.Timer({length:2005,repeatCount:2,callback:myCallback}),
            myCallback = function() { Y.log('Timer interval reached', 'info'); }
            ;
     
        t.on('timer:start',function(e){Y.log('timer started!!!','warn')});
        t.on('timer:stop',function(e){Y.log('timer stopped!!!','warn')});
     
        t.start();
     
     
    });

    Forum Posts

    Subject Author Date
    would be nice to have... Nick Franceschina 07/27/10
    Re: would be nice to have... Anthony Pipkin 07/27/10
    Re: would be nice to have... Nick Franceschina 07/27/10
    Re: would be nice to have... Anthony Pipkin 07/27/10
    Re: would be nice to have... Anthony Pipkin 07/27/10
    Re: would be nice to have... Nick Franceschina 07/27/10
    it seems the mycallback function has not been executed adam.hujingqiang 01/15/11
    Re: it seems the mycallback function has not been executed Anthony Pipkin 01/17/11
    Re: it seems the mycallback function has not been executed adam.hujingqiang 01/19/11
    Re: it seems the mycallback function has not been executed Anthony Pipkin 01/19/11

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info