spacer

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

home / experts / dhtml / column10
Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

Logo

The DHTML Lab Jigsaw Puzzle, Part III: NN4
the control panel


The discussion on this page is more or less repetition, as the functions covered are exactly like the IE versions. Only the third SELECT menu has a change made necessary by Navigator.

The Hint Button

The Hint button calls the giveHint() function. If the puzzle is broken, a single piece solve is performed by calling solve() with an argument of false.

The Grid ON/OFF Button

The Grid ON/OFF button calls the gridToggle() function. If the grid is presently visible, it is made hidden, and the button value is changed to reflect the change. If the grid is not visible, the setGrid() function is called to initialize it and make it visible. In both cases, the value of isGrid, which tracks grid visibility, is toggled.

The Drag ON/OFF Button

The Drag ON/OFF button calls the dragToggle() function, to enable or disable full puzzle draggability. The value of isPuzzDraggable is toggled. If the puzzle is not broken, elPuzzle's draggable property is toggled as well. Finally the button display is changed to conform.

The SELECT Menus

Let's take a brief look at what the three SELECT drop-down menus do. If the user changes the Across or Down menus, the puzzAcross or puzzDown variables are updated to store the new value. Since changing the piece count calls for a new puzzle to be created, isNewPuzz becomes true and isCreated becomes false. The user can continue playing. The new settings will take effect when the user calls for a Break or loads a new puzzle image.

The image SELECT menu brings about instant changes by calling the initPuzz() function with the selected new image src as an argument. It doesn't swap the image like the IE version does, since we need to reload the image by writing new HTML.

Now, let's look at that puzzle again, and sum up.


Produced by Peter Belesis and

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

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

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint

All Rights Reserved. Legal Notices.
Created: Nov. 27, 1997
Revised: Jan. 18, 1998

URL: http://www.webreference.com/dhtml/column10/puzzNSmisc.html