| Home News Product Order Forum Feedback Partner Profile | © Neatware 2000 |
| Neatware | Snaml |
|
Object |
|
|
Last Update: Wed Apr 12 20:04:46 2000 |
|
Snaml Basic
Introduction Syntax Control Types Modules Status Snaml HTML HTML Structure Link Objects Text Font Snaml CSS CSS Script Snaml CGI CGI Variables Output Form Application Snaml XML XML Document EBNF |
Objects are things in a HTML document. Images, applets, and plugins are instances of objects. _object command describes the object in general. The attributes 'classid', 'codebase', and 'codetype' specify the object code. To specify the location of an object, 'classid' attribute has a URL value. In addition, 'codebase' attribute defines the base path to resolve the relative URL in the classid. To specify the content type of a media, 'codetype' has the MIME format such as 'application/mpeg'. The 'data' and 'type' attributes also work for object data. The 'data' attribute defines the location of an object's data. The 'type' attribute specifies the data type. To describe the relevant resources of an object, 'archive' is a urllist. Finally, boolean 'declare' attribute specifies that the object is only a declaration and does not execute during loading.
_object command specifies how to render an object data. The object's code, data, and parameters may be required to specify an objcet. The _object's content is an alternation when the object is not available. Following example demonstrates the rendering of a Snaml animation. If this Tcl animation object is not available it renders a mpeg video, otherwise it shows a gif picture.
_param command specifies a set of runtime values of an object. Any number of the _param commands in arbitrary order may be the content of an object. Its 'name' attribute specifies a runtime parameter that is known by object's implementation. Its 'value' attribute is the value of the runtime parameter. In addition, its 'valuetype' may be data (default), ref, and object where data is a string, ref refers to a location of parameters, and object refers to another object in the same document. 'type' is the 'content-type'.
_object command may insert a java applet with a prefix 'java:'. To insert an ActiveX object it must have a prefix 'clsid:'. Following paragraphs are two examples:
Boolean 'declare' attribute in the _object will not execute the object after loading. The 'id' attribute sets a unique id for later using. In the following example, an anchor declares an object and instaniates it. You can click the linking text and active the object.
_applet command enables a java applet in a HTML document. This command is depreciated in favor of the _object command. Its 'code' attribute specifies the applet location.
_img command embeds an image in the current document. It is a special case of the _object. Its 'src' attribute specifies the location of the image resource. The URL value of the 'longdesc' attribute specifies a location for a long description of the image. When an image is loading, the alternate text of the 'alt' attribute will display at first. This attribute is very useful to display a web page in the low speed Internet. _img command is acturally an empty command. It has no content and end command.
the equivalent _object code is
_map is an image map command. It specifies regions of an image or an object and assign a specific action to each region. When a user actives a region, browser will invoke the corresponding action. A browser or a server may interpret the coordinates of a region.
_map command's 'name' attribute assigns a name to image map. The 'shape' attribute specifies the region shape with the value default, rect, circle, and poly. In addition, 'coords' attribute specifies the position of a shape on the screen. The rect shape may have the coord list left, top, right, bottom; the coord list of circle is center-x, center-y, radius; and the coord list of poly is the pair of x0, y0, x1, y1, ... . To disable a region that associates a link, you must set 'nohref' boolean attribute. Furthermore, 'usemap' attribute associates an image map with an element. Finally, the _area command acts like _a command in the _map content.
To demonstrate the power of Snaml, we presented a source code of an image map procedure. Comparing to other web page editing method, Snaml code automatically compute the coordinates and flexible to change. Resuable Snaml code is another benefit.
|
|
|
|
Last Update: Wed Apr 12 20:04:46 2000 |
|
Object |
| Neatware | Snaml |
| Home News Product Order Forum Feedback Partner Profile | © Neatware 2000 |