Newer
Older
AIR-TUve / src / infoWindow.mxml
@reddawg reddawg on 5 Dec 2007 2 KB *** empty log message ***
<?xml version="1.0" encoding="utf-8"?>
<tvWindow xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" cornerRadius="7" title="IM" width="800" height="630" creationComplete="focusManager.setFocus(npBio);">
  <mx:Script>
  <![CDATA[
    import mx.collections.ArrayCollection;
    
    public var tvMaster:Master;
    
    public function getInfo(vid:Number):void {
      tvMaster.gateway.call("tuve.getFullInfo",new Responder(getInfoRes,tvMaster.onFault),vid);
    }

    public function getInfoRes(result:Array):void {
      var tmpCollection:ArrayCollection;
      if (result != null) {
      	tmpCollection = new ArrayCollection(result);
      	npThumb.source = "/images/" + tmpCollection[0].thumb;
      	npArtist.text = tmpCollection[0].artist;
      	npTitle.text = tmpCollection[0].title;
      	npDescription.htmlText = tmpCollection[0].description;
      	if (tmpCollection[0].bio != null)
      	  npBio.htmlText = tmpCollection[0].bio;
      	if (tmpCollection[0].photo != null)
      	  npImage.source = tmpCollection[0].photo;
        }
      } 
  ]]>
  </mx:Script>

    <mx:Image id="npThumb" source="http://www.ubixonline.com/images/none.gif" width="100" height="100" scaleContent="true" x="10" y="10"/>
    <mx:Label text="Artist: "  x="118" y="10" fontWeight="bold" color="#000000"/>
    <mx:Label id="npArtist"  x="168" y="10" width="350" text="NA" />
    <mx:Label text="Title:"  x="118" y="36" color="#000000" fontWeight="bold"/>
    <mx:Label id="npTitle"  x="168" y="36" width="350" text="NA"/>
    <mx:Button x="118" y="62" label="Buy" click="tvMaster.masterObject.mainNav.selectedIndex = 2;"/>
    <mx:HRule x="10" y="92" width="760"/>
    <mx:Label x="10" y="100" text="Biography:"/>
    <mx:TextArea x="10" y="120" width="505" height="220" id="npBio" focusAlpha="0" />
    <mx:Image x="525" y="120" width="245" height="220" id="npImage" scaleContent="true" source="/images/none.gif"/>
    <mx:Label x="10" y="345" text="Description"/>
    <mx:TextArea x="10" y="365" id="npDescription"  width="760" height="220" focusAlpha="0"/>
</tvWindow>