Krypton DHTML Library (No Longer Under Development!)
Linking libraries into HTML documents: Krypton is broken up into several smaller .lib files. The main file is called kernel.lib and is required to run all other libraries. The libraries can be imported into an HTML document like so:
Terminology of the tutorials:
Variables with quotes around them indicate a variable containing text. If the variable does not have quotes, then the variable is a number. For example, write("HTML") indicates that the value submitted to the function must be text where as x(coordinate) indicates coordinate is a number. Any functions that have a variable name, an equal sign, and then a function will return a value. For example in x_coord=div("name").x(), div("name").x() will return a value.
Abstract functions are functions that you declare on the page which are automatically called if they exist. This is done by writing a null function or a function that doesn't do anything. For example, abs_func=new Function(). When you declare this function again, you override abs_func and the new function is run. The null function is necessary to prevent the browser from giving an error. In Krypton, abstract functions are used to indicate when events happen such as mouseMove(), loaded(),and keyDown(). An example of this would be
The lib object is an object for universal variables and functions to be stored that are used in Krypton. This was done to prevent a programmer from using the same variable names as those used by Krypton and having weird things happen. An example of a universal variable would be lib.browserWidth or lib.divList.
Kernel.lib (view source)
- Necessary functions and predefined variables for DHTML
Slide.lib (view source)
- Move a DIV across the screen in a straight line.
MoveTo.lib (view source)
- Move a DIV along a set of points.
Wipe.lib (view source)
- Incrementally change the clip value on a DIV.
Events.lib (view source)
- Manipulate keyboard and mouse input.
Create.lib (view source)
Scroll.lib (view source)
- Create and area for scrolling a DIV
Drag.lib (view source)
- Drag a DIV around the screen.
loadPage.lib (view source)
- Load an external HTML page into a DIV.