I can execute as this code.
But there is browser dependence.
ex.
<canvas debug="true" bgcolor="red">
<handler name="onwidth">
<![CDATA[
Debug.write( "width: " + this.width );
if( this.width < 800 ){
Debug.write( "resize" );
LzBrowser.loadJS( "javascript:resizeTo(
'800', '600' )" );
}
]]>
</handler>
</canvas>
dependence:
1. FireFox, Netscape works fine.
2. Opera does not work
3. IE. In the case of outbreaking multi event , this does not work.
You can see this execution that by little makes a window small.
The problem No.3 is famouse in the forum. :^)
P T Withington wrote:
You could try LzBrowser.loadJS which lets you execute javascript in
the browser. I have not tried that. In Legal's we hope to have a
better solution.
On 2006-11-24, at 19:27 EST, mt1 wrote:
Thanx PT,
My explanation was bad, the sample want to control the browser
window size.
Can i it by using LZBrowser class or cannot do it by a limit of
"Flash Player"?
mt1
P T Withington wrote:
On 2006-11-24, at 03:51 EST, mt1 wrote:
Hi forks,
How can i control a canvas size order to resize a browser.
For example:
<canvas debug="true" bgcolor="red">
<handler name="onwidth">
<![CDATA[
Debug.write( "width: " + this.width );
if( this.width < 600 ) canvas.setWidth( 600 );
]]>
</handler>
</canvas>
<canvas width="100%" height="100%">
will make the canvas fill the browser window and follow resizing
of the window.