View Full Version : Slider Not Working
metrov8
09-19-2006, 06:59 PM
I have a slider that has always worked fine. I just discovered it's not working anymore, even though I changed nothing about it.
The code for the slider is:
xpos = getProperty("scroll", _x);
setProperty ("big", _x, -2.38*xpos);
Is there something new in Flash that would cause this code not to work?
The scroller can be found at: www.mediashox.com (http://mediashox.com)
It's the horizontal scroller on the bottom
Thanks very much
sdalbert
09-19-2006, 10:13 PM
There's nothing wrong with your code, there's something wrong with the slider. Even if the code was right, your slider should still move. Check your mouse events for it.
metrov8
09-19-2006, 10:25 PM
This is my mouse code [in the drag button]
on (press) {
startDrag("_level19.bar.scroll", false, -301, 115, 251, 115);
}
on (release, releaseOutside, rollOut) {
stopDrag();
}
Also, my instance names are in place.
Should be working, but it simply stopped working. Hmmmm
Flash Gordon
09-19-2006, 10:30 PM
There's nothing wrong with your code, there's something wrong with the slider. Even if the code was right, your slider should still move. Check your mouse events for it.
Not sure about that. I'm don't think setPropery() works when published for Flash 8.
You should get rid of the old syntax, dude.
metrov8
09-19-2006, 10:36 PM
Flash Gordon,
I don't write AS, am only a humble designer. Do you think you could possibly update the code for me? It would be much appreciated...you will receive a star in heaven. Thank you.
Flash Gordon
09-19-2006, 10:38 PM
// old way
xpos = getProperty("scroll", _x);
// new way
var xpos:Number = scroll._x;
// old way
setProperty ("big", _x, -2.38*xpos);
// new way
big._x = -2.38 * xpos;
Rossman
09-19-2006, 10:38 PM
I don't know the old syntax, but am guessing:
xpos = scroll._x;
big._x = -2.38 * xpos;
EDIT: Doh! Beaten like a red-headed stepchild.
metrov8
09-19-2006, 10:51 PM
OK, I tried both Rossman's and Flash Gordon's code suggestions, and neither works.
I wonder what else could be the problem?
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.