Max,

Thank you for your reply, and yes i know as you said, but the canvas
attributes of
'width' and 'height' cannot set with using the method.
The debugger shows the error that ' setHeight cannot be called on the
canvas'.
So i have tried to set the canvas width/height with using embed.js.

 This is the simple example.

<canvas debug="true" bgcolor="0x0000ff">
        <handler name="onwidth">
        <![CDATA[
                if( this.width<800 )
                        this.setAttribute("width",800);
        ]]>
        </handler>
</canvas>

 Dose the attributes of canvas can not change after the application
initialized ?

Thank in advance.
mt1

Max Carlson wrote:

>mt1 wrote:
>  
>
>>Hi forks,
>>
>>Can i use a functions, that contained embed.js file, in <canvas> ?
>>I mean as following
>>
>><canvas>
>><script>
>>LzBrowser.loadJS( "../lps/includes/embed.js" );
>></script>
>>
>><view>
>><handler .....>
>>lzSetCanvasAttribute( ..... );
>></handler>
>></view>
>></canvas>
>>
>>If this work, it is possible to change the canvas attribute values while
>>a application working.
>>But dose not work it. Is there any tips or the canvas attribute can not
>>change after the application
>>has initialized ?
>>
>>Thanks in advance
>>mt1
>>    
>>
>
>Hi mt1,
>
>You can change a canvas attribute more directly from within an app like
>this:
>
><handler .....>
> canvas.setAttribute(name, value);
></handler>
>
>Including embed.js in your LZX application may cause problems.  embed.js
>is intended to be used by the HTML wrapper page that embeds your
>application - do a 'view source' in the browser for an example.
>
>  
>

Reply via email to