Hi All,
I'm Having trouble Navigating through the ViewStack component I can get to the First and Last 80% w/o bugs but next and previous ViewStackChildren are still avoiding me. Can someone look at my code and let me know what I'm doing wrong?
Thanks, -Art
====== CODE ====== var n:Number=0;
function addViewStackChild()
{
trace("adding child to noteList");
n++;
var s:String;
var d:Date=new Date();
s=n + " - (RDJ) " + ((d.getMonth() + 1) + "/" + d.getDate() + "/" +
d.getFullYear() + " " + d.getHours() + ":" + d.getMinutes() + ":" +
d.getSeconds());
var note:mx.core.UIObject=mx.core.UIObject(noteList.createChild(noteComp, "",
{title:s}));
noteList.setChildIndex(note,0);trace(noteList.numChildren);
}
function removeViewStackChild()
{
noteList.destroyChildAt(0);
trace("note removed");
}function firstViewStackChild()
{
var i:Number = 1;
var last:Number = n -i;
noteList.selectedIndex = last;
trace("first button pressed " + last );
}
function nextViewStackChild()
{
var i:Number = 1;
var next:Number = noteList.selectedIndex() +i;
noteList.selectedIndex = next;
trace("next button pressed " + next );
}
function previousViewStackChild()
{
var i:Number = 1;
var previous:Number = noteList.selectedIndex() -i;
noteList.selectedIndex = previous;
trace("previous button pressed " + previous );
}
function lastViewStackChild()
{
noteList.selectedIndex = 0;
trace("last button pressed " + 0 );
}====== END CODE =======

