actionscript中移动应用程序的悬停状态不起作用
在我的代码中,实际上fontsize应该改变,如果它被悬停,但没有改变。为什么不呢? 因为如果我将鼠标悬停在标签上,fontsize应该切换到20。有人知道问题出在哪里吗?通常,您应该期望字体在悬停后调整大小,但它不会调整大小actionscript中移动应用程序的悬停状态不起作用,actionscript,Actionscript,在我的代码中,实际上fontsize应该改变,如果它被悬停,但没有改变。为什么不呢? 因为如果我将鼠标悬停在标签上,fontsize应该切换到20。有人知道问题出在哪里吗?通常,您应该期望字体在悬停后调整大小,但它不会调整大小 <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library:/
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:ArrayList id="employeList">
<fx:String>Mein Buch, was geht</fx:String>
<fx:String>Der Graf von Monte Christo</fx:String>
<fx:String>Hier steht das neu buche</fx:String>
<fx:String>hmmm</fx:String>
</s:ArrayList>
<s:ArrayList id="testList">
<fx:Object test="try" test2="this"></fx:Object>
<fx:Object test="out" test2="plz"></fx:Object>
</s:ArrayList>
</fx:Declarations>
<s:DataGroup dataProvider="{(testList)}" >
<s:layout>
<s:VerticalLayout>
</s:VerticalLayout>
</s:layout>
<s:itemRenderer>
<fx:Component>
<s:ItemRenderer>
<s:states>
<s:State name="normal">
</s:State>
<s:State name="hovered" >
</s:State>
<s:State name="selected" >
</s:State>
</s:states>
<s:BorderContainer>
<s:layout >
<s:HorizontalLayout
horizontalAlign="center" paddingBottom="80">
</s:HorizontalLayout>
</s:layout>
<s:Label text="{data.test} {data.test2}"
fontSize.hovered="20" fontSize.selected="30">
</s:Label>
<s:CheckBox>
</s:CheckBox>
</s:BorderContainer>
</s:ItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:DataGroup>
</s:Application>
在代码中,您编写 指定悬停和选择状态的字体,但不指定正常状态的字体 由于上述代码中未指定正常状态下的字体,因此正常状态下的字体与悬停状态下的字体之间可能没有明显差异 我建议您首先添加另一个参数:
fontSize="10"
当其他fontSize.state参数不适用时,这将适用。我认为移动设备没有悬停状态。您可能更愿意使用等效的MOUSE_down如果您使用MOUSE down,您会使用MOUSE up取消选择吗?如果你没有专注于特定的标签,你就继续用鼠标?