Animation openlaszlo按钮和放射组参考
我是openlaszlo的初学者,我想创建一个交互式web界面,模拟vomplex天文钟的指示。可以输入坐标和日期/时间,或选择实时或timelapse MODU 我曾尝试使用edittext字段和按钮以及radiobutton组来选择信息,然后根据选择移动图像。 当我只使用edittext字段和按钮时,它就工作了。文本条目显示在output edittext(输出编辑文本)字段中,图像将真正旋转给定的圆弧。添加radiobutton组时,选定的圆弧将显示在output edittext字段中,但图像不会旋转。有人能帮忙吗 这是密码Animation openlaszlo按钮和放射组参考,animation,openlaszlo,Animation,Openlaszlo,我是openlaszlo的初学者,我想创建一个交互式web界面,模拟vomplex天文钟的指示。可以输入坐标和日期/时间,或选择实时或timelapse MODU 我曾尝试使用edittext字段和按钮以及radiobutton组来选择信息,然后根据选择移动图像。 当我只使用edittext字段和按钮时,它就工作了。文本条目显示在output edittext(输出编辑文本)字段中,图像将真正旋转给定的圆弧。添加radiobutton组时,选定的圆弧将显示在output edittext字段中,
<canvas>
<!-- Load of the image -->
<view name="Zeiger" x="100" y="100" resource="images/Kal_Ring_Stundenzeiger.gif" id="HandID">
<!-- Methode to rotate the image, Arc is set by the argument -->
<method name="rotate" args="Arc">
var increment = 0 + Arc;
var dur = 700;
this.animate('rotation',increment,dur);
</method>
</view>
<!-- Control unit -->
<view name="Bedienung" x="200" y="10">
<simplelayout axis="y" inset="8"/>
<text text="Output:"/>
<edittext id="outputID" text = "0"/>
<text text="Arc:"/>
<edittext id="WinkelID" text = "51"/>
<button x="000" y="160">
Rotation
<!-- Handler to execute the Method -->
<handler name="onclick">
var x = WinkelID.getText();
HandID.rotate(x);
outputID.setAttribute('text',x);
</handler>
</button>
<!-- when I remove the radiogroup, then the image rotates -->
<radiogroup id="group1ID">
<handler name="onselect">
var Arcchoice = this.getValue();
HandID.rotate(Arcchoice);
outputID.setAttribute('text',Arcchoice);
</handler>
<radiobutton value="0" text="0°" selected="true"/>
<radiobutton value="90" text="90°"/>
<radiobutton value="180" text="180°"/>
<radiobutton value="270" text="270°"/>
<radiobutton value="360" text="360°"/>
</radiogroup>
</view>
</canvas>
var增量=0+弧;
var-dur=700;
这个。动画('旋转',增量,dur);
轮换
var x=WinkelID.getText();
旋转手柄(x);
setAttribute('text',x);
var archoice=this.getValue();
旋转手柄(Arcchoice);
setAttribute('text',archoice);
我已经用OpenLaszlo 5.0 trunk测试了代码,它在SWF10和DHTML运行时都能正常工作
下面是应用程序的屏幕截图,其中包含LzClock小部件中的资源(没有可用于测试的SWF资源)。我已经在文本字段中输入了圆弧值,并单击按钮设置旋转
我已经在Linux上使用Chrome和Firefox进行了测试,还没有在Windows上进行过测试。您使用的是哪个OpenLaszlo版本、运行时和浏览器?您是否在所有浏览器和运行时中都看到了问题?目前使用的最好的OpenLaszlo版本是5.0(trunk),因为5.0中修复了许多bug,但4.9中没有修复。谢谢Raju,我使用了Lazlo 4.9.0,更新到5.0.X后,它在我的windows 7计算机上工作。是的,很不幸,5.0中修复了这么多bug,但这么长时间以来还没有官方发布。许多人在使用4.9时遇到问题,不知道使用5.0会更好。