Hi,
The test code for mousewheel and scrolled-bar on swf10 is here.
<?xml version="1.0" encoding="UTF-8"?>
<canvas proxied="false" bgcolor="0xeeeeee">
<view width="50" height="100" bgcolor="white" clip="true">
<text multiline="true">
1<br/>2<br/>3<br/>4<br/>5<br/>6<br/>7<br/>8<br/>9<br/>
a<br/>b<br/>c<br/>d<br/>e<br/>f<br/>g<br/>h<br/>i<br/>j<br/>k<br/>
</text>
<scrollbar id="sb" visible="${this.scrollable}" >
<handler name="onmousewheeldelta" reference="lz.Keys" args="d">
this.step(-d);
</handler>
<handler name="oninit" reference="canvas">
this.step(100);
</handler>
</scrollbar>
</view>
</canvas>
The sample URL is
http://www.openlaszlo-ason.com/doku.php/scrollbar#%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%81%A7%E3%82%B9%E3%82%AF%E3%83%AD%E3%83%BC%E3%83%AB%E3%81%97%E3%81%8D%E3%81%A3%E3%81%9F%E7%8A%B6%E6%85%8B%E3%81%AB%E3%81%99%E3%82%8B
But the site is written by Japanese.
---
ason
2010/4/14 cem sonmez <[email protected]>:
> hi all
> I am trying to use the mousewheel for a view on swf10 env.
> Testcases below(two aspects) works for swf8 properly but not for swf10
>
> <canvas bgcolor="#EAEAEA" width="800" height="510">
> <view width="400" height="300" clip="true" bgcolor="0xFFFFFF">
> <swatchview width="350" height="900" bgcolor="blue" focusable="true"
> clickable="true" name="view1"/>
> <vscrollbar usemousewheel="true" focusview="$once{parent.view1}"/>
> </view>
> </canvas>
>
> referencing :
> http://www.antunkarlovac.com/blog/2007/08/03/the-mouse-wheel-in-openlaszlo/
>
> <canvas bgcolor="#EAEAEA" width="800" height="510">
> <view width="400" height="300" clip="true" bgcolor="0xFFFFFF">
> <swatchview width="350" height="900" bgcolor="blue" focusable="true"
> clickable="true" name="view1">
> <handler name="onmousewheeldelta" reference="lz.Keys"
> args="direction"><![CDATA[
> var thisX = this.getMouse("x");
> var thisY = this.getMouse("y");
> if (this.containsPt(thisX, thisY)) {
> parent.myScrollbar.step(-direction);
> }
> ]]></handler>
> </swatchview>
> <vscrollbar name="myScrollbar" focusview="$once{parent.view1}"/>
> </view>
> </canvas>
>
> Is there any workaround for swf10
>
> And another question is :
> do you know how to set the scroll positon to the bottom of its focusview
>
> Thanks is advance
> Best regards
> --
> Cem SONMEZ
>