slider to control the loaded swf
Hi,
I have created the slider manually,i am not using the component, once the swf loaded (animation swf), the slider start moving, when i drag and drop the slider the loded swf should go and stop to the particular keyframe.can any tell me where i am going wrong,and loaded swf animations are inside the movieclip(home_mc)
this is my code,
var lmt_rect:Rectangle = new Rectangle(-56,-30,122,0);
menubutton.slider_mc.addEventListener(MouseEvent.MOUSE_DOWN,startdrag);
menubutton.slider_mc.addEventListener(MouseEvent.MOUSE_UP,stopdrag);
menubutton.slider_mc.addEventListener(Event.ENTER_FRAME,startmove);
function startmove(e:Event)
{
menubutton.slider_mc.x=((currentSWF.currentFrame/currentSWF.totalFrames)*100)-47;
}
function startdrag(e:Event)
{
menubutton.slider_mc.startDrag(true,lmt_rect);
menubutton.slider_mc.removeEventListener(Event.ENTER_FRAME,startmove);
}
function stopdrag(e:Event)
{
menubutton.slider_mc.stopDrag();
menubutton.slider_mc.addEventListener(Event.ENTER_FRAME,startmove);
currentSWF.gotoAndPlay(currentSWF.currentFrame);
}