<
?xml version = "1.0" encoding = "utf-8"?
>
< ! --每个精品软件-- >
<mx:Canvas xmlns:mx = "http://www.adobe.com/2006/mxml"
width = "950"
height = "560"
xmlns:phoneBusinesses = "leo.view.phoneBusinesses.*">
< mx:Script >
<![CDATA[
import mx.events.EffectEvent;
public static const DESTROYED:String="destroyed";
private var _myData:Object;
private var flag:String;
[Bindable]
/** 每个精品软件XML数据:【software.xml】.software.Item[index] */
public function get myData():Object {
return _myData;
}
public function set myData(value:Object):void {
_myData=value;
}
private function closeBtnClicked(event:MouseEvent):void {
destroy();
}
public function destroy():void {
flag="destroy";
thisContainer.visible=false;
}
private function faded(event:EffectEvent):void {
if(flag=="show") {
//
} else if(flag=="destroy") {
thisContainer.removeAllChildren();
this.removeAllChildren();
dispatchEvent(new Event(DESTROYED));
}
}
]]>
</mx:Script>
<mx:Fade id = "fadeIn"
duration = "2000"
alphaFrom = "0"
alphaTo = "1"/>
<mx:Fade id = "fadeOut"
duration = "2000"
alphaFrom = "1"
alphaTo = "0"/>
<mx:Canvas id = "thisContainer"
visible="false"
width = "100%"
height = "100%"
showEffect = "fadeIn"
hideEffect = "fadeOut"
effectEnd = "faded(event)">
<mx:Canvas id = "bg"
width = "100%"
height = "100%"
backgroundAlpha = "0.5"
backgroundColor = "0x000000">
< ! --背景图片-- >
<mx:Canvas id = "imgBg"
width = "517"
height = "529"
horizontalCenter = "0"
verticalCenter = "0"
styleName = "softwareItemContent">
< ! --精品软件名称-- >
<mx:Text id = "titleText"
x = "17"
y = "7"
width = "300"
color = "#000000"
fontSize = "14"
text = "{myData.title}"/>
< ! --参数(左上角)-- >
<phoneBusinesses:SoftwareItemParams x = "10"
y = "40"
myData = "{myData}"/>
< ! --下载到手机(右上角)-- >
<phoneBusinesses:DownloadToPhone id = "DownloadToPhone"
x = "337"
y = "39"
myData = "{myData}"/>
<mx:Text x = "20"
y = "165"
color = "#000000"
fontSize = "13"
text = "应用介绍"/>
< ! --应用说明(下方)-- >
<phoneBusinesses:SoftwareItemIntroduction x = "10"
y = "190"
myData = "{myData}"/>
<mx:Button id = "closeBtn"
right = "15"
top = "7"
label = "×"
click = "closeBtnClicked(event)"
color = "#FF0000"
fontSize = "12"/>
</mx:Canvas>
</mx:Canvas>
</mx:Canvas>
</mx:Canvas>
< ! --每个精品软件-- >
<mx:Canvas xmlns:mx = "http://www.adobe.com/2006/mxml"
width = "950"
height = "560"
xmlns:phoneBusinesses = "leo.view.phoneBusinesses.*">
< mx:Script >
<![CDATA[
import mx.events.EffectEvent;
public static const DESTROYED:String="destroyed";
private var _myData:Object;
private var flag:String;
[Bindable]
/** 每个精品软件XML数据:【software.xml】.software.Item[index] */
public function get myData():Object {
return _myData;
}
public function set myData(value:Object):void {
_myData=value;
}
private function closeBtnClicked(event:MouseEvent):void {
destroy();
}
public function destroy():void {
flag="destroy";
thisContainer.visible=false;
}
private function faded(event:EffectEvent):void {
if(flag=="show") {
//
} else if(flag=="destroy") {
thisContainer.removeAllChildren();
this.removeAllChildren();
dispatchEvent(new Event(DESTROYED));
}
}
]]>
</mx:Script>
<mx:Fade id = "fadeIn"
duration = "2000"
alphaFrom = "0"
alphaTo = "1"/>
<mx:Fade id = "fadeOut"
duration = "2000"
alphaFrom = "1"
alphaTo = "0"/>
<mx:Canvas id = "thisContainer"
visible="false"
width = "100%"
height = "100%"
showEffect = "fadeIn"
hideEffect = "fadeOut"
effectEnd = "faded(event)">
<mx:Canvas id = "bg"
width = "100%"
height = "100%"
backgroundAlpha = "0.5"
backgroundColor = "0x000000">
< ! --背景图片-- >
<mx:Canvas id = "imgBg"
width = "517"
height = "529"
horizontalCenter = "0"
verticalCenter = "0"
styleName = "softwareItemContent">
< ! --精品软件名称-- >
<mx:Text id = "titleText"
x = "17"
y = "7"
width = "300"
color = "#000000"
fontSize = "14"
text = "{myData.title}"/>
< ! --参数(左上角)-- >
<phoneBusinesses:SoftwareItemParams x = "10"
y = "40"
myData = "{myData}"/>
< ! --下载到手机(右上角)-- >
<phoneBusinesses:DownloadToPhone id = "DownloadToPhone"
x = "337"
y = "39"
myData = "{myData}"/>
<mx:Text x = "20"
y = "165"
color = "#000000"
fontSize = "13"
text = "应用介绍"/>
< ! --应用说明(下方)-- >
<phoneBusinesses:SoftwareItemIntroduction x = "10"
y = "190"
myData = "{myData}"/>
<mx:Button id = "closeBtn"
right = "15"
top = "7"
label = "×"
click = "closeBtnClicked(event)"
color = "#FF0000"
fontSize = "12"/>
</mx:Canvas>
</mx:Canvas>
</mx:Canvas>
</mx:Canvas>