Anthony Pipkin![]()
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).
<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();
});
© 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