can anyone help with some coding?

PHiuR

Diamond Member
Apr 24, 2001
9,539
2
76
dynamic class Slider extends MovieClip
{
var dragging:Boolean;
var currentSlider

//this function is getting the slider to slide or move across the track
function Slider()
{
this.dragging = false;

this.knob_mc.onPress = function()
{

this.startDrag(false, 0, 0, this._parent.track_mc._width, 0);
this._parent.dragging = true;
};

this.knob_mc.onRelease = function()
{

this.stopDrag();
this._parent.dragging = false;
};

}

//this is giving the value from the position of the slider and calling the function sliderAction from the Bear.as file
function onEnterFrame ()
{
if (this.dragging == true)
{
var val = this.knob_mc._x/this.track_mc._width;
_root.currentSelection.sliderAction(this, val);

}
}


}























dynamic class Color extends MovieClip
{
private var maxColor;

function Color()
{

maxColor = 100;
}



function setColor(colorFrame:Number)
{

_root.color_mc.gotoAndStop(colorFrame);
}



function sliderAction(whichSlider:MovieClip, howMuch:Number)
{


if (whichSlider == slidercolor_mc)
{

this.setColor(Math.round( howMuch * maxColor));
}

}




trying to make a slider in flash control a movie clip frames...can't seem to get it to control the frames =\

pretty sure im naming everything correctly.