Need help with this:
I want the slide value in an Variable I can use other place in program. The slide have the value 0-100.
protected function hslide_changeHandler(event:Event):void
I need the value in a variable here...
Thanks for any help!
Yes but it doesnt work either, any other idea?
someVariable = event.target.value;
someVariable = event.target.value(hslide_changeHandler);
someVariable = event.target.valueof(hslide_changeHandler);
someVariable = HSlider(event.target).value;
You may want to listen to the changeEnd event instead of the change event. The change event will continuously fire as the user is moving the slider.
The changeEnd event fires when they are done moving the slider.
Yes I think the type is the wrong thing here.
The Hslider is a Object and the one im assigning to is a string.
Is there any way to assign object var to string var?
public var SlideValue.Object
public var NewValue.String
If you want the current value selected by the user with the hslide you
// declare your variable as a 'Number' because HSlider.value is a Number...
public var newValue:Number;
// inside your event handler, assign the current Value of your HSlider to the variable...
newValue = HSlider(event.target).value;
Your problem may have been the variable type all along.
Europe, Middle East and Africa