⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 projectlisttextviewitem.mxml

📁 flex 实现的一个showcase 喜欢flex的朋友可以
💻 MXML
字号:
<?xml version="1.0" encoding="utf-8"?>
<components:SelectAwareItemRenderer
	xmlns:mx="http://www.adobe.com/2006/mxml"
	xmlns:components="com.flexShowcase.components.*"
	
	width="760"
	height="30"
	
	horizontalScrollPolicy="off"
	verticalScrollPolicy="off"
	
	buttonMode="true"
	mouseChildren="false"
	select="handleSelect()"
	creationComplete="creationCompleteHandler(event)">
	
	
	<mx:Script>
		<![CDATA[
			
			//////////////////////////////////////////////////
			//import
			import com.flexShowcase.data.Project;
			
			//////////////////////////////////////////////////
			//initialization
			
			private function creationCompleteHandler(event:Event):void {
				addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
				addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
			}
			
			
			//////////////////////////////////////////////////
			//public functions
			
			public function showRollOver():void{
				container.styleName = "projectListItemOver";
				title.styleName = "myriadRegularWhite";
				detailsStrip.renderAsOver();
				
			}
			public function hideSelected():void{
				container.styleName = "myFeaturedItemOut";
				title.styleName = "myriadRegular";
				detailsStrip.renderAsUp();
				
			}
			private function showSelected():void{
				container.styleName = "projectListItemSelected";
				title.styleName = "myriadRegularWhite";
				detailsStrip.renderAsOver();
			}
			
			
			//////////////////////////////////////////////////
			//handler functions
			
			private function handleSelect():void{
				if (isSelected) {
					showSelected();
				} else {
					hideSelected();
				}
			}
			public function mouseOverHandler(mouseEvent:MouseEvent):void {
				if (!isSelected) {
					showRollOver();
				}
			}
			public function mouseOutHandler(mouseEvent:MouseEvent):void {
				if (isSelected) {
					showSelected();
				} else {
					hideSelected();
				}
			}
			
			
		]]>
	</mx:Script>
	
	
	<mx:HBox id="container" height="27" width="100%" paddingTop="5">
		<mx:HBox width="100%" paddingLeft="5" horizontalAlign="left">
			<mx:Label id="title" styleName="myriadRegular" text="{data.name}" />
		</mx:HBox>
		<mx:HBox width="100%" paddingRight="5" paddingTop="2" horizontalAlign="right">
			<components:ProjectDetailStrip id="detailsStrip" data="{data}" />
		</mx:HBox>
	</mx:HBox>
	
	<mx:Image source="@Embed('/assets/images/frontend/projectlist/projectList_listItemDiv.png')" left="5" bottom="0" />
	
	
</components:SelectAwareItemRenderer>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -