📄 dragdrop.mxml
字号:
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://www.adobe.com/2006/mxml" horizontalGap="0" xmlns:qs="qs.controls.*" horizontalAlign="left" paddingLeft="0" paddingTop="0" paddingBottom="0" paddingRight="0" layout="horizontal"
backgroundColor="#343434" initialize="initApp()"
viewSourceURL="DragDropViewSource/index.html" xmlns:f="flash.filters.*" >
<Script>
<![CDATA[
[Bindable] public var images:Array;
[Bindable] public var targetData:Array = [];
private function initApp():void
{
var images:Array = [];
var list:Array = [];
for(var i:int=1;i<=14;i++)
{
list.push("img/img"+i+".jpg");
}
for(var j:int=0;j<3;j++)
{
images = images.concat(list);
}
this.images = images;
cmp.dataProvider = images;
}
]]>
</Script>
<Style>
.insetBox {
paddingBottom: 30;
paddingLeft: 30;
paddingRight: 30;
paddingTop: 30;
}
Application, Text {
color: #FFFFFF;
}
VRule {
strokeWidth: 1;
strokeColor: #FFFFFF;
}
</Style>
<VBox height="100%" backgroundColor="#565656" width="400" horizontalAlign="right" styleName="insetBox">
<Text condenseWhite="true" width="100%">
<htmlText><![CDATA[
<P>This Application demonstrates how the DragTile component supports Drag/Drop.
You can drag images back and forth between the two DragTile instances on the top
and bottom of the window.</P>
<P>
By default, items are moved from the dataProvider of one component to the other.
If you hold down the shift key, it will copy them instead.
</p>
]]></htmlText>
</Text>
</VBox>
<VRule height="100%" />
<VBox width="100%" horizontalGap="20" height="100%" styleName="insetBox" clipContent="true" >
<VBox width="100%" horizontalGap="0" height="100%" borderColor="#FFFFFF" borderStyle="solid">
<qs:DragTile id="cmp" width="100%" height="100%">
<qs:itemRenderer>
<Component id="imageRenderer">
<qs:BitmapTile />
</Component>
</qs:itemRenderer>
</qs:DragTile>
</VBox>
<VBox width="100%" horizontalGap="0" height="150" borderColor="#FFFFFF" borderStyle="solid">
<qs:DragTile id="cmp2" width="100%" height="100%" dataProvider="{targetData}">
<qs:itemRenderer>
<Component>
<qs:BitmapTile />
</Component>
</qs:itemRenderer>
</qs:DragTile>
</VBox>
</VBox>
</Application>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -