
<?xml version="1.0" encoding="utf-8"?>


<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"

verticalGap="10"

backgroundColor="#FFFFFF"

pageTitle="手机"

initialize="initApp()">

<mx:Style source="main.css"/>


<mx:HTTPService id="phoneService" url="phonelist.jsp" resultFormat="xml">

<mx:request>

<categoryID>{categoryId}</categoryID>

</mx:request>

</mx:HTTPService>


<mx:Model id="phonelist">

{phoneService.result.phonelist.phone}

</mx:Model>



<mx:Script>

<

var categoryId = 2;

var categoryName = "Moto";

function initApp() {

phoneService.send();

}


]]>

</mx:Script>


<mx:HBox>

<mx:LinkBar styleName="title" width="500" click="" >

<mx:dataProvider>

<mx:Array>

<mx:Object label="首 页" link="main"/>

<mx:Object label="手机分类" link="catagory"/>

<mx:Object label="论 坛" link="forum"/>

<mx:Object label="关 于" link="about"/>

</mx:Array>

</mx:dataProvider>

</mx:LinkBar>

<mx:Label text="搜索"/>

<mx:TextInput id="key" width="120"/>

<mx:Button label="Go"/>

</mx:HBox>

<mx:HBox>

<mx:Image source="images/qd_2.jpg"/>

<mx:Label id="debug" text="123"/>

</mx:HBox>


<mx:Effect>

<mx:Zoom name="zoomBig" zoomTo="107" duration="100"/>

<mx:Zoom name="zoomSmall" zoomTo="100" duration="100"/>

</mx:Effect>


<mx:HBox>

<mx:Panel id="main" title="" height="360">

<mx:Tile width="520">

<mx:Repeater id="plist" dataProvider="{phonelist}" startingIndex="" count="">

<mx:VBox id="itemBox" verticalGap="0" horizontalAlign="center" mouseUp="">

<mx:Canvas width="100" height="100" clipContent="false">

<mx:Image width="90" height="90" source="{plist.currentItem.image}" toolTip="RMB {plist.currentItem.price}" mouseOverEffect="zoomBig" mouseOutEffect="zoomSmall" visible="false" complete="event.target.visible=true;"/>

</mx:Canvas>

<mx:Label id="itemName" text="{plist.currentItem.name}"/>

<mx:Label id="itemPrice" text="RMB{plist.currentItem.price}"/>

</mx:VBox>

</mx:Repeater>

</mx:Tile>

<mx:ControlBar>

<mx:Button label="上一页" click=""/>

<mx:Button label="下一页" click=""/>

<mx:Button label="refresh" click="initApp()"/>

</mx:ControlBar>

</mx:Panel>

</mx:HBox>



<mx:HBox horizontalAlign="center">

<mx:Label text="Copy Right 2004 dannyr's Studio "/>

</mx:HBox>

</mx:Application>