📄 projectlistthumbviewitem.mxml
字号:
<?xml version="1.0" encoding="utf-8"?>
<components:SelectAwareItemRenderer
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:components="com.flexShowcase.components.*"
width="180"
height="120"
horizontalScrollPolicy="off"
verticalScrollPolicy="off"
select="handleSelect()"
creationComplete="creationCompleteHandler(event)">
<mx:Script>
<![CDATA[
//////////////////////////////////////////////////
//import
import com.flexShowcase.data.Project;
//////////////////////////////////////////////////
//public variables
[Bindable] public var thumbnailURL:String;
//////////////////////////////////////////////////
//initialization
private function creationCompleteHandler(event:Event):void {
addEventListener(MouseEvent.MOUSE_OVER,handleRollOver);
addEventListener(MouseEvent.MOUSE_OUT,handleRollOut);
}
//////////////////////////////////////////////////
//private functions
private function showRollOver():void {
title.styleName = "myriadRegularWhite";
}
private function hideSelected():void {
title.styleName = "myriadRegular";
}
private function showSelected():void {
title.styleName = "myriadRegularWhite";
}
//////////////////////////////////////////////////
//handler functions
private function handleSelect():void{
if (isSelected) {
showSelected();
} else {
hideSelected();
}
}
public function handleRollOver(mouseEvent:MouseEvent):void {
if(!isSelected){
showRollOver()
}
}
public function handleRollOut(mouseEvent:MouseEvent):void {
if(isSelected){
showSelected();
}else{
hideSelected();
}
}
]]>
</mx:Script>
<mx:HBox horizontalCenter="-2" width="100%">
<mx:Canvas backgroundAlpha="0" backgroundColor="0x000000" buttonMode="true" mouseChildren="false">
<mx:Label id="title" styleName="myriadRegular" x="10" y="0" width="100" text="{data.name}" />
<components:ThumbnailRenderer id="thumbnail" project="{data as Project}" x="15" y="20" width="154" height="93" />
</mx:Canvas>
</mx:HBox>
</components:SelectAwareItemRenderer>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -