Hi, I’m new to flash actionscript and trying to create a smooth scrollbar in flash mx. Since 2 days I’m trying it without any luck. I’ve followed the tutorials from
[COLOR=#810081]http://tutorialvid.com/viewVideo.php?vi … lash_Part1[/COLOR]
import caurina.transitions.*;
var yOffset:Number;
var yMin:Number = 0;
var yMax:Number = sb.track.height - sb.thumb.height;
sb.thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbDown);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbUp) ;
function thumbDown(e:MouseEvent):void
{
stage.addEventListener(MouseEvent.MOUSE_MOVE, thumbMove);
yOffset = mouseY - sb.thumb.y;
}
function thumbUp(e:mouseUp):void
{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, thumbMove);
}
function thumbMove(e:MouseEvent):void
{
sb.thumb.y = mouseY - yOffset;
if(sb.thumb.y <= yMin)
sb.thumb.y = yMin;
if(sb.thumb.y >= yMax)
sb.thumb.y = yMax;
var sp:Number = sb.thumb.y / yMax;
Tweener.addTween(content, {y:(-sp*(content.height-masker.height)),
time:1});
e.updateAfterEvent();
}
and I’ve uploaded the caurina folder also
but when i try to publish the movie it shows errors:
Symbol=scrollbox, Layer=actions, Frame=1: Line 1: ;’ expected
import caurina.transitions.*;
Symbol=scrollbox, Layer=actions, Frame=1: Line 10: {’ expected
function thumbDown(e:MouseEvent):void
Symbol=scrollbox, Layer=actions, Frame=1: Line 16: {’ expected
function thumbUp(e:mouseUp):void
Symbol=scrollbox, Layer=actions, Frame=1: Line 21: {’ expected
function thumbMove(e:MouseEvent):void
Please, Can anybody help me on this ??
I’m using flash mx version 6.0
Thank you