Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411588 Posts in 69386 Topics- by 58443 Members - Latest Member: Mansreign

May 06, 2024, 11:16:20 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Scroll position in Actionscript 2 ListBox
Pages: [1]
Print
Author Topic: Scroll position in Actionscript 2 ListBox  (Read 1360 times)
Wilson Saunders
Level 5
*****


Nobody suspects the hamster


View Profile WWW
« on: November 11, 2009, 02:54:15 PM »

Hi guys, I am at my wit’s end here. I am working in actionscript 2 on Flash Professional 8. I have a list box I created via Window->Components->List. I can add items, get selected items, and clear the object. However I can’t detect where the friggen vertical scroll bar is. I need this information to show some graphics next to the elements in the list. So far I have tried the following command and all have given me “undefined” in the output window:

trace(myListBox.getScrollPosition() );
trace(myListBox.scroll );
trace(myListBox.scroll() );
trace(myListBox.verticalScrollPosition  );
trace(myListBox.verticalScrollPosition()  );
trace(myListBox.getVerticalScrollPosition()  );
trace(myListBox.verticalScrollBar)  );

I can detect the scroll value of a TextBox just fine, but this Listbox is giving me fits. Suggestions for alternate controlls would also be apreciated, I am not married to the idea of a list box, only its functionality.
Logged

Play my games at http://monkeydev.com/
Montoli
Level 7
**


i herd u liek...?


View Profile WWW
« Reply #1 on: November 11, 2009, 05:03:10 PM »

Well, I can't directly help you with listboxes, because I have minimal experience with them.  I CAN give you some general advice though about flash, since that I DO have experience with.  Here goes:

Avoid the built in flash components like the plague.  They're crap.

Seriously, everything on the component panel is bloated buggy junk and including them makes your file size balloon terribly.  In many/most cases (depending on your confidence in UI programming) you could easily make your own in actionscript for less effort than it would take to make them work.  (And heck, it's not like theirs are special.  They are also just written in actionscript.  They just have a fancier UI.)

I hope this doesn't come across as unhelpful.  It really is meant to be constructive.  It's just... I've done a fair bit of programming in AS2, and I really really really distrust the components they provide, even more than I distrust most unfamiliar code.

If you can write the functionality yourself, I heartily recommend just jettisoning the components and making your own.  ESPECIALLY if you're in flash 8/Actionscript 2.  (They were particularly bad then, from what I remember.)

Best of luck!

-Montoli
Logged

www.PaperDino.com

I just finished a game!: Save the Date
You should go play it right now.
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic