spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / dhtml / column11
Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

Logo

The DHTML Lab Jigsaw Puzzle, Part IV: Cross-Browser
the miscellaneous support functions


The last functions in our main script are all either unchanged or have had if...else statements added with already discussed browser-specific code inserted. But since we are going through the complete script, they are reproduced here for reference and comparison. The one exception is allDone().

Tidying Up

Since we are tracking auto-solves, the very first thing allDone() does, before performing the clean-up statements, is check to see if an auto-solve is in progress. If one is, it is cancelled by clearing the timer (flashTimer) that calls visToggle() and enables looping back to solve(). Then isSolved is set to false to reflect the change, and allDone() proceeds.

If the puzzle is completely solved, the mousedown capture is released for Navigator, to be re-enabled, as we have seen, only when the mouse passes over the image or the puzzle is once again broken.

The Toggle Buttons

Before we reproduce the complete code, let's take a quick look at the drag script.


Produced by Peter Belesis and

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business

All Rights Reserved. Legal Notices.
Created: Dec. 17, 1997
Revised: Jan. 18, 1998

URL: http://www.webreference.com/dhtml/column11/puzzCBmisc.html