A way to import images
<canvas debug="true">
<dataset name="imagedata">
<image url="http://www.laszlosystems.com/images/horses/horse-1-sm.jpg"/>
</dataset>
<wrappinglayout/>
<image src="http://www.laszlosystems.com/images/horses/horse-1-sm.jpg"/>
<image datapath="imagedata:/image/@url"/>
<image prefix="http://www.laszlosystems.com/images/horses/" src="horse-1-sm.jpg"/>
<image src="http://www.laszlosystems.com/images/horses/horse-1-sm.jpg"/>
<image>
<text>Click me</text>
<handler name="onclick">
this.setAttribute('src', 'http://www.laszlosystems.com/images/horses/horse-1-sm.jpg');
</handler>
</image>
<image forcereload="true">
<text>Click me to reload</text>
<handler name="onclick">
this.setAttribute('src', 'http://www.laszlosystems.com/images/horses/horse-1-sm.jpg');
</handler>
</image>
</canvas>
| Attributes | |||||
| Name | Usage | Type (Tag) | Type (JS) | Default | Category |
| forcereload | Tag & JS | boolean | Boolean | false | setter |
|
If true, the same URL will be reloaded. If false, the same URL will not load multiple times. |
|||||
|
|
|||||
| lastloaded | Tag & JS | string | String | setter | |
|
The last URL loaded by this image tag. Used to prevent the same URL from loading twice. @keywords readonly |
|||||
|
|
|||||
| prefix | Tag & JS | string | String | setter | |
|
an optional prefix URL to load from. If specified, the url will be appended to this prefix. |
|||||
|
|
|||||
| src | Tag & JS | string | String | setter | |
|
The URL to load the image from. May be set directly on this attribute or indirectly by specifying a datapath for this tag. |
|||||
|
|
|||||
class, classroot, cloneManager, datapath, id, ignoreAttribute, ignoreplacement, immediateparent, initstage, name, nodeLevel, onconstruct, oninit, parent, placement, subnodes
aaactive, aadescription, aaname, aasilent, aatabindex, align, bgcolor, clickable, clickregion, clip, cursor, defaultplacement, fgcolor, focusable, focustrap, font, fontsize, fontstyle, frame, framesloadratio, hassetheight, hassetwidth, height, layout, loadratio, mask, onblur, onclick, ondata, ondblclick, onfocus, onkeydown, onkeyup, onmousedown, onmouseout, onmouseover, onmouseup, onselect, opacity, options, pixellock, play, resource, resourceheight, resourcewidth, rotation, selectiontype, showhandcursor, source, stretches, subviews, totalframes, unstretchedheight, unstretchedwidth, valign, visible, width, x, xoffset, y, yoffset
| loadNow() | ||
| image.loadNow(img) | ||
|
Loads an image in response to the src attribute being set. Should not be called directly - setAttribute('src' ...) shoudl be used instead. @keywords private |
||
| Parameters | ||
| Name | Type | Desc |
| img | None | |
|
|
||
animate, applyConstraint, applyData, childOf, completeInstantiation, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, lookupSourceLocator, searchImmediateSubnodes, searchSubnodes, setAttribute, setDatapath, setID, setName, setOption
addProxyPolicy, addSubview, bringToFront, construct, containsPt, getAttributeRelative, getBounds, getColor, getColorTransform, getContextMenu, getCurrentTime, getDepthList, getHeight, getID3, getMouse, getPan, getTotalTime, getVolume, getWidth, init, measureHeight, measureWidth, play, releaseLayouts, removeProxyPolicy, searchParents, searchSubviews, seek, sendBehind, sendInFrontOf, sendToBack, setAAActive, setAADescription, setAAName, setAASilent, setAATabIndex, setAlign, setAttributeRelative, setBGColor, setClickable, setColor, setColorTransform, setContextMenu, setCursor, setHeight, setLayout, setOpacity, setPan, setPlay, setResource, setResourceNumber, setRotation, setShowHandCursor, setSource, setValign, setVisible, setVolume, setWidth, setX, setY, shouldYieldFocus, stop, stretchResource, unload, updateResourceSize
| Events |
onaddsubresource, onaddsubview, onblur, onclick, ondblclick, onerror, onfocus, onframe, onheight, onlastframe, onload, onmousedown, onmousedragin, onmousedragout, onmouseout, onmouseover, onmouseup, onmouseupoutside, onopacity, onplay, onremovesubview, onstop, ontimeout, onwidth, onx, ony
Copyright © 2002-2005 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.