📄 screenshotstabscreenshotsslider.mxml
字号:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:components="com.flexShowcase.components.*"
horizontalScrollPolicy="off"
verticalScrollPolicy="off"
creationComplete="creationCompleteHandler(event)"
>
<mx:Script>
<![CDATA[
//////////////////////////////////////////////////
//import
import com.flexShowcase.data.Project;
import com.flexShowcase.data.Screenshot;
import com.flexShowcase.net.remote.GeneralOperationsService;
import flash.events.Event;
import mx.collections.ArrayCollection;
import mx.events.ListEvent;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
//////////////////////////////////////////////////
//private variables
[Bindable] public var __images:ArrayCollection
//////////////////////////////////////////////////
//public variables
public var lastSelectedIndex:uint;
//////////////////////////////////////////////////////////////////
[Bindable]
public function set images(val:ArrayCollection):void{
this.__images=val
}
public function get images():ArrayCollection{
return this.__images
}
public function get selectedScreenshot():Screenshot {
return screenshotHorizontalList.selectedItem as Screenshot;
}
//////////////////////////////////////////////////
//initialization
private function creationCompleteHandler(event:Event):void {
lastSelectedIndex = 0;
}
//////////////////////////////////////////////////
//public functions
public function clear():void {
screenshotHorizontalList.dataProvider = null;
}
//list updating-------------------------------------------------------------
private function handleListDrawUpdate(event:Event):void {
if(screenshotHorizontalList.selectedIndex != lastSelectedIndex){
screenshotHorizontalList.selectedIndex = lastSelectedIndex;
}
}
private function screenshotHorizontalListChangeHandler(listEvent:ListEvent):void {
lastSelectedIndex = screenshotHorizontalList.selectedIndex;
}
]]>
</mx:Script>
<mx:Image source="@Embed('/assets/images/screenshots_slider_bg.png')" />
<mx:Canvas id="imagesHolder_mc" horizontalScrollPolicy="off" verticalScrollPolicy="off"
width="100%">
<components:ScreenshotHorizontalList width="100%"
id="screenshotHorizontalList"
borderStyle="none"
borderThickness="0"
backgroundAlpha="0.3"
horizontalScrollPolicy="off"
verticalScrollPolicy="off"
useRollOver="false"
dataProvider="{images}"
itemRenderer="com.flexShowcase.components.account.screenshots.ScreenshotsSliderImage"
change="screenshotHorizontalListChangeHandler(event)"
updateComplete="handleListDrawUpdate(event)"/>
</mx:Canvas>
</mx:Canvas>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -