View Full Version : [AS3] SliderUI - Make draggable sliders easily and quickly!
mprzybylski
July 28th, 2008, 03:58 PM
View Example (http://evolve.reintroducing.com/_source/classes/as3/SliderUI/SliderUIExample.html)
View Documentation (http://evolve.reintroducing.com/_source/classes/as3/SliderUI/SliderUI.html)
View Post/Download (http://evolve.reintroducing.com/2008/07/28/as3/as3-sliderui/)
If you’re anything like me, you hate using components and try to steer clear of them WHENEVER you can. The SliderUI was spawned from this hate and is a super easy way to create a slider (the equivalent to the Slider component, except it weighs in at a whopping 1KB compared to the 17KB of the component). The SliderUI has pretty much all of the same functionality of the Slider component.
dail
July 28th, 2008, 11:00 PM
Looks nice.
Interesting that you use a timer to update the slide value in combo with your getters.
Whenever I make one of these I usually go the event dispatch route as a means for outside parties to access the sliders values. So its cool to see a different approach.
mprzybylski
July 29th, 2008, 12:55 AM
hey dail,
thanks. I use getters/setters just so that you could retrieve it at any time independent of any events.
dail
July 29th, 2008, 01:14 AM
Hi,
Yeah, that's cool.
I like events so I can just listen to that event and get a constantly updating slider value from the slider as it changes, good for say, creating a volume slider or something. I usually throw in getters/setters as well.
I'm in at work, so I can't open your demo .fla (Flash 8 only here) to see how you have set it all up.
Anyway, its nice. All your class's are well thought out and thorough.
mprzybylski
July 29th, 2008, 01:19 AM
yeah, normally i would like doing that as well, i just figured that a user who needs to have it in that manner can run an enter frame or a timer or whatever to just pull the getter (or a mouseMove for the slider). i guess i could have also made it dispatch on mouse move, there is alot of ways this could have been done actually now that you bring it up :P i guess i just did what made sense at the time.
there isnt really much in the fla, just a call to the constructor for each slider passing in the given params and thats really it.
and thanks for the kind words, i hope people get some use out of the classes i create.
Sith717
February 23rd, 2010, 07:45 PM
Nice, can you add a separate FLA file for the horizontal slider since when I try to remove the vertical one, the horizontal one stops working...
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.