0 Replies Latest reply on Dec 7, 2008 8:41 AM by icecappacino


      I'm using a DataSet component to manage a photo gallery...

      when a thumbnail is clicked a DataSet.find() is done to get the id of the thumbnail to load the large scaled version of it.However, on a "next" button click using DataSet.next() doesn't seem to load the "next" item in the collection (or maybe it does but it doesn't coincide with what has been listed in order as expected by the thumbnail listing.) I'm not sure I understand how the DataSet.find() works but this is what I have so far

      ActionScript Code:

      _photosDataSet.addSort("sortByID", ["id"]);

      if (_photosDataSet.find([_id])) {
      itemID = _photosDataSet.getItemId();
      // Now use locateByID() to position the current iterator
      // on the item in the collection whose ID matches studentID.
      if (itemID != null) {

      var d:Object = _photosDataSet.currentItem;


      ActionScript Code:

      if (!_gallery._photosDataSet.hasNext()) {
      return false;
      var _photoData:Object = _gallery._photosDataSet.currentItem;

      I have tried setting resetting the iterator or selectedIndex but it doesn't seem to work out right...What am I not understanding here?