Prototyping 29 October 2012: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
Simple setInterval & setTimeout... (see [http://pzwart3.wdka.hro.nl/wiki/User:Nan_Wang/counting Nan's example]) | Simple setInterval & setTimeout... (see [http://pzwart3.wdka.hro.nl/wiki/User:Nan_Wang/counting Nan's example]) | ||
<source lang="javascript"> | |||
var animation_id = window.setInterval(draw, 50); | |||
setTimeout(function () { | |||
window.clearInterval(animation_id); | |||
}, 5000); | |||
</source> | |||
Adding time to the wikipedia "edit teleprompter" example (continuing from [[User:Marlon/wikicanvas|last week]]) | Adding time to the wikipedia "edit teleprompter" example (continuing from [[User:Marlon/wikicanvas|last week]]) |
Revision as of 12:45, 29 October 2012
Some example of adding time...
Simple setInterval & setTimeout... (see Nan's example)
var animation_id = window.setInterval(draw, 50);
setTimeout(function () {
window.clearInterval(animation_id);
}, 5000);
Adding time to the wikipedia "edit teleprompter" example (continuing from last week)
Using audio/video timelines (see Niek's example) (Here's another)
- ontimeupdate