0 Replies Latest reply on Jul 23, 2008 3:44 AM by GaryThompson76

    List And Itemrender - problem displaying digg - Help

    GaryThompson76 Level 1
      http://www.eservices.hull.ac.uk/porthull/digg/Digg.html


      I've done this quick example, it loads the data from Digg, and displays the title and body text using an itemRenderer, there is a problem scrolling and some of the items are barely there.

      Is this a bug ?

      Code

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" initialize="setup()" autoLayout="true">

      <mx:HTTPService id="GetStories" useProxy="false"
      method="GET" result="GetStoriesResult();" url=" http://services.digg.com/stories/popular?appkey=http%3A%2F%2Fwww.port.hull.ac.uk"
      fault="mx.controls.Alert.show(event.fault.faultString)">
      </mx:HTTPService>

      <mx:Script>
      <![CDATA[

      public function setup():void {

      GetStories.send();
      }

      public function GetStoriesResult():void {
      Stories.dataProvider = GetStories.lastResult.stories.story;
      }

      // ---------------------------------------------------------------------------
      public function JumpTo():void {
      var bob:String = new String();

      bob = Stories.selectedItem.link;

      var u:URLRequest;
      u = new URLRequest(bob);

      navigateToURL(u);
      }
      // ---------------------------------------------------------------------------

      ]]>
      </mx:Script>

      <mx:List width="316" height="539" itemRenderer="Item_Component" itemClick="JumpTo();" id="Stories"
      horizontalCenter="0" y="10" themeColor="#C3C4C4" variableRowHeight="true" backgroundColor="#F2F2F2"></mx:List>

      </mx:Application>


      Component


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="100%"
      horizontalScrollPolicy="off" verticalScrollPolicy="off" themeColor="#E9E9E9">

      <mx:VBox y="0" width="99%" horizontalCenter="0" id="bob">
      <mx:Text text="{data.title}" width="99%" fontFamily="Arial" fontSize="11" toolTip="{data.href}"
      selectable="false" color="#00006C" fontWeight="bold"/>
      <mx:Text text="{data.description}" width="99%" fontFamily="Arial" fontSize="10" toolTip="{data.href}"
      selectable="false" color="#00006C" fontWeight="normal" resize="true"/>
      </mx:VBox>

      </mx:Canvas>