//goto first data set record
_root.data_ds.first();
addMovieClips(0);
function addMovieClips(i) {
//loop through data and create a new instance of the targetClip for each record.
while (_root.data_ds.hasNext()) {
//trace("called else");
attachMovie("targetClip", "site"+i, getNextHighestDepth(), _root.data_ds.currentItem);
_root["site"+i]._y = _root["site"+i]._y+(i*100);
i++;
_root.data_ds.next();//this is important don't leave it out or the script will bomb.
}
//this is the part where you set the scrollbar to ON so
//that it sets itself after the data is loaded, also
//check your targeting as mine was _parent._parent your
//might be different.
_parent._parent.MyScrollPane.vScrollPolicy = "on"
}
stop();