Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Prepped for forge
  • Loading branch information
ryanflorence committed Dec 6, 2009
1 parent 5ce2c1b commit 0d04f0d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
Binary file added Assets/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions README.md
@@ -1,27 +1,33 @@
Loop
====

A Utility Class. Its methods can be implemented with [Class-implement][1] into any [Class][2]. Used to run a class method on a periodical.
![Loop](http://github.com/rpflorence/Loop/raw/master/Assets/logo.png)

A Utility Class. Its methods can be implemented with Class-implement into any Class. Used to run a class method on a periodical.

Useful in galleries, slideshows, tickers, sprite animations, pulsing, logout scripts, etc. Anything that needs to run the same function repeatedly.

How to use
----------

### Example:

var Widget = new Class({

Implements: Loop,

initialize: function(log){
this.setLoop(this.update, 1000);
this.log = document.id(log);
},

update: function(count){
this.log.set('text',"Looped " + count + " times");
}

});

var myWidget = new Widget('log').startLoop();


View the [MooDoc](http://moodocs.net/rpflo/mootools-rpflo/Loop) for usage and examples.
24 changes: 24 additions & 0 deletions Source/Loop.js
@@ -1,3 +1,27 @@
/*
---
script: Loop.js
description: Runs a class method on a periodical
license: MIT-style license.
authors: Ryan Florence <http://ryanflorence.com>
docs: http://moodocs.net/rpflo/mootools-rpflo/Loop
requires:
- core
provides: [Loop]
...
*/




var Loop = new Class({

loopCount: 0,
Expand Down
6 changes: 6 additions & 0 deletions package.yml
@@ -0,0 +1,6 @@
name: Loop
author: Ryan Florence
category: Utilities
tags: [mixin]
docs: http://moodocs.net/rpflo/mootools-rpflo/Loop
current: 1.0

0 comments on commit 0d04f0d

Please sign in to comment.