Slide Puzzle using Mootools

Slide Puzzle using Mootools

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
202 views

So I finally decided to try out one of these JavaScript libraries … and what better way than to create a Slide puzzle. I chose mootools because of there modular download … it’s pretty slick. My goal was to make it simple for users:

- include the source file
– add one DIV with IMG
– no need to slice up image
Usage:

 //ADD SCRIPT TAGS
<script src="j/mootools.v1.00.js" type="text/javascript">
</script>
<script src="j/puzzle.js" type="text/javascript">
</script>	

//ADD DIV ID PUZZLE WITH IMG
<div id="puzzle">
<img src="abc.jpg" alt="" width="5" height="5" />
</div>

//CALL FUNCTIONS functions
//makes 3x3
Puzzle.make(3);

//shuffles puzzle
Puzzle.shuffle();

//fixes puzzle
Puzzle.fix() ;

//switch image
Puzzle.switch_image('xyz.jpg')
  


Demo: http://www.nuff-respec.com/technology/slide-puzzle-javascript-mootools
Download: http://www.nuff-respec.com/file_download/11/puzzle.zip
Source: http://www.nuff-respec.com/technology/slide-puzzle-javascript-mootools

http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/magnolia_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/google_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/sphinn_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/mixx_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/twitter_32.png

Related Listings:

  1. MOOSLIDE – AJAX Content Slide Additional functions added for mootols 1.2 version: autoCloseDelay – define...
  2. AJAX Feed API Slide Show Control This afternoon we extended the AJAX Feed API with a...
  3. ImageCaption – a MooTools Plugin for Auto-Captioning Images ImageCaption is a MooTools 1.2+ plugin for easily adding figure...
  4. Get Slick Effects with MooTools Kwicks When it came time for my employer to redo their...
  5. MooTools EXT Adapter Script Here is my attempt at creating a mootools adapter for...

Do you like this post?

Email:     

Tags: , , , , , , , , ,

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment



Web Design & CSS (Templates) - TOP.ORG