Hi, I copied this from another site...
but when I TRY and publish i continually get "2 errors" and I have TRIED everything to make it work... are the functions entered incorrectly? I tried adding {}, but nothing helps it run....
I marked *** Line 91 ***** and 107 **** in the AS below (very bottom of code)
thanks, this is driving me CRAZYYYYYYYYYYYY
~HotWings
----------------------------------
DEBUG ERRORS:
**Error** Symbol=Symbol 337, layer=ActionScript, frame=1:Line 91: '{' expected
scrollSlider = function (dir);
**Error** Symbol=Symbol 337, layer=ActionScript, frame=1:Line 107: Syntax error.
Total ActionScript Errors: 2 Reported Errors: 2
----------------------------------
ACTUAL ACTIONSCRIPT:
PHP Code:
setLinesVisible = function ()
{
var visibleIndex = 7;
var pos = this.holder._y;
var topClips = int(pos / -15);
var i = _root.lineArr.length;
if (this.holder != NULL)
{
variables = this.holder;
var feed = this.holder[variables];
feed._visible = true;
(true);
feed._visible = false;
!(topClips >= i || int(topClips + visibleIndex) < i) ? false : true;
i--;
} // End of the function
} // end if
setSliderHeight = function ()
{
if (this.holder._height < initHeight)
{
this.slider._height = initHeight;
this.slider._visible = false;
}
else
{
this.slider._height = initHeight * (initHeight / this.holder._height);
this.slider._visible = true;
} // End of the function
} // end if
initHeight = 80;
speed = 5;
function ()
{
var scrollPos = -slider._y + 1;
var ratio = this.initHeight / this.slider._height;
var newPos = scrollPos * ratio;
var difY = newPos - this.holder._y;
this.holder._y = int(this.holder._y + difY / speed);
} // End of the function
easeDrag = function ()
{
setSliderHeight();
var dragSpace = 2 + this.initHeight - this.slider._height;
var ratio = this.initHeight / this.slider._height;
this.slider._y = dragSpace;
this.holder._y = int(2 - this.slider._y * ratio);
} // End of the function
reposSlider = function (dir)
{
var scrollSpace = 2 + initHeight - this.slider._height;
var stepNum = Math.floor(scrollSpace / 8);
var scrollStep = int(scrollSpace / stepNum);
var ratio = initHeight / this.slider._height;
if (dir == -1)
{
swDebug.trace("going down = " + scrollStep);
if (this.slider._y + scrollStep >= scrollSpace)
{
this.slider._y = this.slider._y + scrollStep;
}
else
{
this.slider._y = scrollSpace;
} // end if
}
else
{
swDebug.trace("going up = " + scrollStep);
if (this.slider._y - scrollStep >= 1)
{
this.slider._y = this.slider._y - scrollStep;
}
else
{
this.slider._y = 1;
} // end if
} // end if
this.holder._y = int(2 - this.slider._y * ratio);
} // End of the function
****************LINE 91*************
PHP Code:
scrollSlider = function (dir);
slider.onPress = function ()
{
this._parent.dragmode = 1;
var dragSpace = 2 + this._parent.initHeight - this._parent.slider._height;
this.startDrag(false, 203, 1, 203, dragSpace);
} // End of the function
slider.onRelease = function ()
{
this._parent.dragmode = 0;
this.stopDrag();
} // End of the function
****************LINE 107****************
PHP Code:
setSliderHeight();