I load an image and add it to the MC someMC. If "something" is true, the someVariable gets the someMC scaleX number. Let's say its 0.82.
What I need is to get that number into the s.value in my Slider object. Since I want the Slider value to be where my image scale is.
This of course doesn't work because of variable scope limitations.
I have tried setting the variable at the top of the code like this: var someVariable:Number; but that didn't work either.
Here's the code:
function completeHandler(event:Event):void{
if (something) {
var someVariable:Number = this.someMC.scaleX;
}
}
var s:Slider = new Slider();
s.maximum = 500;
s.minimum = 10;
s.value = someVariable;
Any thoughts?
Update
I'm looking for a solution without having to use package and class, since I'm not that steady with AS3 yet.
Update 2
I've uploaded all the code to Pastebin. Take a look ;)