• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

can anyone help with some coding?

PHiuR

Diamond Member
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.
 
Back
Top