Cyman666
2009-03-24 14:27:19 UTC
Hi
I have a movieclip which im scrolling using the following script:
down_btn.addEventListener(MouseEvent.MOUSE_DOWN,buttonPressed2);
up_btn.addEventListener(MouseEvent.MOUSE_UP,buttonPressedprev2);
function buttonPressed2(event:MouseEvent){
landscape_mc.nextFrame()
}
function buttonPressedprev2(event:MouseEvent){
landscape_mc.prevFrame()
}
function buttonPressed(evt:MouseEvent){
stage.addEventListener(Event.ENTER_FRAME, goNext)
}
function buttonReleased(evt:MouseEvent){
stage.removeEventListener(Event.ENTER_FRAME, goNext)
}
function goNext(evt:Event):void {
landscape_mc.nextFrame();
}
down_btn.addEventListener(MouseEvent.MOUSE_DOWN,buttonPressed);
down_btn.addEventListener(MouseEvent.MOUSE_UP,buttonReleased);
function buttonPressed3(evt:MouseEvent){
stage.addEventListener(Event.ENTER_FRAME, goNext3)
}
function buttonReleased3(evt:MouseEvent){
stage.removeEventListener(Event.ENTER_FRAME, goNext3)
}
function goNext3(evt:Event):void {
landscape_mc.prevFrame();
}
up_btn.addEventListener(MouseEvent.MOUSE_DOWN,buttonPressed3);
up_btn.addEventListener(MouseEvent.MOUSE_UP,buttonReleased3);
all works fine, but what id like to do is to have the movieclip loop so that
when "landscape_mc" gets to the last frame it will go back to frame 1. ive
added the gotoAndPlay ("1") to the last frame and this works fine whilst
utilising the "nextFrame" command but not when using the "prevFrame"
is there a way round this?
Many thanks in advance
I have a movieclip which im scrolling using the following script:
down_btn.addEventListener(MouseEvent.MOUSE_DOWN,buttonPressed2);
up_btn.addEventListener(MouseEvent.MOUSE_UP,buttonPressedprev2);
function buttonPressed2(event:MouseEvent){
landscape_mc.nextFrame()
}
function buttonPressedprev2(event:MouseEvent){
landscape_mc.prevFrame()
}
function buttonPressed(evt:MouseEvent){
stage.addEventListener(Event.ENTER_FRAME, goNext)
}
function buttonReleased(evt:MouseEvent){
stage.removeEventListener(Event.ENTER_FRAME, goNext)
}
function goNext(evt:Event):void {
landscape_mc.nextFrame();
}
down_btn.addEventListener(MouseEvent.MOUSE_DOWN,buttonPressed);
down_btn.addEventListener(MouseEvent.MOUSE_UP,buttonReleased);
function buttonPressed3(evt:MouseEvent){
stage.addEventListener(Event.ENTER_FRAME, goNext3)
}
function buttonReleased3(evt:MouseEvent){
stage.removeEventListener(Event.ENTER_FRAME, goNext3)
}
function goNext3(evt:Event):void {
landscape_mc.prevFrame();
}
up_btn.addEventListener(MouseEvent.MOUSE_DOWN,buttonPressed3);
up_btn.addEventListener(MouseEvent.MOUSE_UP,buttonReleased3);
all works fine, but what id like to do is to have the movieclip loop so that
when "landscape_mc" gets to the last frame it will go back to frame 1. ive
added the gotoAndPlay ("1") to the last frame and this works fine whilst
utilising the "nextFrame" command but not when using the "prevFrame"
is there a way round this?
Many thanks in advance