Hi all,

I'm having problems with i list which i'm outputting from an array. The
code is for a vertical list which outputs the title of the site and url
(which is working fine). When the user clicks on each individual item, it
will 'open up' and reveil the rest of the movie clip. When it opens up i
need all the items underneath the clicked on item to move down the page to
allow the clicked on item to be displayed.

The problem is that when i add spacing for next movie clip it will only
add spacing to the last item in the array as the array has already been
looped through. Here is the code:


var list:Array = new Array();
list=[["Website1","http://www.site1.com"],["Website2","http://www.site2.com"],["Website3","http://www.site3.com"],["Website4","http://www.site4.com"],["Website5","http://www.site5.com"],["Website6","http://www.site6.com"],["Website7","http://www.site7.com"],["Website8","http://www.site8.com";]];
function buildList(number):Void {
        spacing=27;//105;
        var i=-1;
        while (++i<list.length) {
                name="newscontent"+i;
                y=i*spacing;
                newClip=display.list.attachMovie("newscontent",name,i);
                newClip._y=y;
                newClip.main_txt.text=list[i][0];
                newClip.subtitle_txt.text = list[i][1];
                //button actions
                newClip.onRollOver = function(){
                        this.bg._alpha = 60;
                }
                newClip.onRelease = function(){
                        //this is when click in item will open up
                        this.gotoAndStop(2);
                                                
                }
                newClip.onRollOut = function(){
                        this.bg._alpha = 100;
                        this.gotoAndStop(1);
                }
        }
}

buildList();


Any help appreciated,

Jake

---
You are currently subscribed to fugli as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to