View Full Version : getting resource properties
girardjf
01-22-2003, 12:12 PM
hello,
what's the syntax for retieving properties of a view's resource? such as height, width, x and y?
thnks,
-j
antun
01-22-2003, 12:17 PM
a = view.getAttribute( 'height' );
b = view.getAttribute( 'width' );
and so on. There's also setAttribute for setting them.
Have a look at:-
http://www.laszlosystems.com/developers/learn/documentation/lzxref/ViewsystemNode.php#getAttribute
--Antun
girardjf
01-22-2003, 12:22 PM
this syntax defaults to the resource and not the view?
thanks,
-j
antun
01-22-2003, 03:34 PM
Hey Justin
Sorry, I misunderstood your first question. Here's what you were looking for:-
<canvas debug="true">
<view resource="http://www.laszlosystems.com/img/h_head_logo.gif"
onclick="debug.write( this.resourcewidth )"/>
</canvas>
There's also resourceheight too.
Take care,
Antun
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.