What we have here is a slide which when moved will scale a box.
Thinking not much there, wrong. Dive in and you will find you can use several parts of the script on other projects.
Lets get started.
//a preloader script.
onFrame (1) {
if (getBytesLoaded() >= getBytesTotal())
{
gotoAndPlay(5);
}
}
onFrame (3) {
if (getBytesLoaded() >= getBytesTotal())
{
gotoAndPlay(5);
}
}
onFrame (4) {
progress = int(getBytesLoaded() * 100 / getBytesTotal()) add "% - loading Flash...";
gotoAndPlay(3);
}
onFrame (5) {//now we start the slide
ball.onpress = function ()
{
ball.startDrag(0.000000 == 1.000000, 5, 183, 150, 183);//this sets the guide for the ball
d = 1;
};
ball.onrelease = function ()
{
stopDrag();
d = 0;
};
onmousemove = function ()
{
if (_ymouse > 212 || _ymouse < 184)
{
stopDrag();
d = 0;
}
else if (d == 1)
{
disp = ball._x;
block._width = disp;
block._height = disp;
}
};
play ();
}
onFrame (6) {
stop ();
}
File is below
http://cycle1500.com/slidescalebar.swf