Commit 97ebc90c authored by Michael Friedrich's avatar Michael Friedrich
Browse files

Squashed 'clippy.js/js/clippy.js/' content from commit 8bfd1f9

git-subtree-dir: clippy.js/js/clippy.js
git-subtree-split: 8bfd1f92c725c6bc3a435d538a77c3302b327c08
parents
Copyright (c) 2012 Fireplace, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE ABOVE LICENSE IS FOR THE CODE (JAVASCRIPT AND CSS) IN CLIPPY.JS ONLY.
All Microsoft agents, including agent names, the Clippy brand and all resources are the property of Microsoft and their respective owners.
\ No newline at end of file
[Clippy.JS](http://smore.com/clippy-js)
=========
Add Clippy or his friends to any website for instant nostalgia.
Read more about the project on [our homepage](http://smore.com/clippy-js).
Usage: Setup
------------
Add this code to you to your page to enable Clippy.js.
```html
<!-- Add the stylesheet to the head -->
<link rel="stylesheet" type="text/css" href="clippy.css" media="all">
...
<!-- Add these scripts to the bottom of the page -->
<!-- jQuery 1.7+ -->
<script src="jquery.1.7.min.js"></script>
<!-- Clippy.js -->
<script src="clippy.min.js"></script>
<!-- Init script -->
<script type="text/javascript">
clippy.load('Merlin', function(agent){
// do anything with the loaded agent
agent.show();
});
</script>
```
Usage: Actions
--------------
All the agent actions are queued and executed by order, so you could stack them.
```javascript
// play a given animation
agent.play('Searching');
// play a random animation
agent.animate();
// get a list of all the animations
agent.animations();
// => ["MoveLeft", "Congratulate", "Hide", "Pleased", "Acknowledge", ...]
// Show text balloon
agent.speak('When all else fails, bind some paper together. My name is Clippy.');
// move to the given point, use animation if available
agent.moveTo(100,100);
// gesture at a given point (if gesture animation is available)
agent.gestureAt(200,200);
// stop the current action in the queue
agent.stopCurrent();
// stop all actions in the queue and go back to idle mode
agent.stop();
```
Special Thanks
--------------
* The awesome [Cinnamon Software](http://www.cinnamonsoftware.com/) for developing [Double Agent](http://doubleagent.sourceforge.net/)
the program we used to unpack Clippy and his friends!
* Microsoft, for creating clippy :)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment