ActionScript 2.0 Components Language Reference |
|
|
|
| List component > List.vPosition | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
listInstance.vPosition
Property; sets the topmost visible item of the list. If you set this property to an index number that doesn't exist, the list scrolls to the nearest index. The default value is 0.
The following example displays the current value of the vPosition of the list whenever the contents of the list are scrolled:
my_list.setSize(200, 60);
my_list.rowCount = 4;
my_list.vPosition = 2;
my_list.addItem({data:"flash", label:"Flash"});
my_list.addItem({data:"flex", label:"Flex"});
my_list.addItem({data:"coldfusion", label:"ColdFusion"});
my_list.addItem({data:"dreamweaver", label:"Dreamweaver"});
my_list.addItem({data:"fireworks", label:"Fireworks"});
my_list.addItem({data:"contribute", label:"Contribute"});
my_list.addItem({data:"breeze", label:"Breeze"});
var listListener:Object = new Object();
listListener.scroll = function(evt_obj:Object) {
trace("my_list.vPosition = " + my_list.vPosition);
}
my_list.addEventListener("scroll", listListener);
|
|
|
|