I'm setting selected element in s:List component with Actionscript, it works, but List doesn't scroll to selected item -- need to scroll with scrollbar or mouse. Is it possible to auto-scroll to selected item ? Thanks !
相关问题
- garbage collection best practices
- How to load flex swf from flash?
- FlashDevelop Haxe (Flash) debugger
- Detecting user's camera settings
- Displaying two fullscreen windows on two monitors
相关文章
- Are there any benefits when using final in AS3?
- Trace on Chrome/Browser console
- as3 ByteArray to Hex (binary hex representation)
- About Collision detection alghorithms in AS3
- How to upload BitmapData to a server (ActionScript
- Manage resources to minimize garbage collection ac
- changin the default width and height of the dropdo
- as3 object values NativeText
I saw this basic idea here... http://arthurnn.com/blog/2011/01/12/coverflow-layout-for-flex-4/
Try the
s:List
method ensureIndexIsVisible(index:int):void.In flex-3 there is a
scrollToIndex
method and hence you can callI believe this should work in flex-4 too.
This worked for me. had to use the callLater.
You can multiply the height of an element by its index and pass this value to:
This function will scroll to the top of the list in Flex 4+. It takes in account the height of the item, so it will work for lists with different items with different height.