Copy link to clipboard
Copied
hello there
i made a frame sequence that progresses every 5 frames....
but i dont know the action script for this sequence, oly for every 1 frame
does anybody has the action for 5 by 5?
Copy link to clipboard
Copied
you want to advance by 5 frames instead of one? or you want to advance by one frame, but after 5 advances to something else? or something else
Copy link to clipboard
Copied
i want the action script to avance....to progress every 5 frames no 1
thanks for the support
Copy link to clipboard
Copied
function advanceFiveF(e:MouseEvent):void{
if(currentFrame+5>totalFrames){
gotoAndStop((currentFrame+5)%totalFrames);
} else {
gotoAndStop(currentFrame+5);
}
}
Copy link to clipboard
Copied
hello man
thank you a lot
but i did not get the context
where do i place the next button and previous button
how do i place this
thanks a lot
Copy link to clipboard
Copied
have the button that you want to advance by 5 call that function.
Copy link to clipboard
Copied
please man tell me exactly to do
i am lost
Copy link to clipboard
Copied
what's the name of the button that you want to advance 5 frames when clicked?
Copy link to clipboard
Copied
nextfromfile button to advance
and to go backwards prevfromfile
i need to advance and backwards
thanks a lot
Copy link to clipboard
Copied
i need for this
Copy link to clipboard
Copied
nextfromfile.addEventListener(MouseEvent.CLICK, advanceFiveF);
function advanceFiveF(e:MouseEvent):void{
if(currentFrame+5>totalFrames){
gotoAndStop((currentFrame+5)%totalFrames);
} else {
gotoAndStop(currentFrame+5);
}
}
Copy link to clipboard
Copied
thanks a lot what about going backwards
Copy link to clipboard
Copied
do you have your nextfromfile button working the way you want?
Copy link to clipboard
Copied
i will try now
Copy link to clipboard
Copied
oh my gosh
it worked
give me the
action for backwards
your are the man
Copy link to clipboard
Copied
prevfromfile.addEventListener(MouseEvent.CLICK, retreatFiveF);
function retreatFiveF(e:MouseEvent):void{
if(currentFrame-5<1){
gotoAndStop(totalFrames+currentFrame-5);
} else {
gotoAndStop(currentFrame-5);
}
}
Copy link to clipboard
Copied
hello man thanks
its not working for previous
what could it be
Copy link to clipboard
Copied
do you see anything in the output panel when testing?
Copy link to clipboard
Copied
it does not apear anything wrong
just dont work ...just this
Copy link to clipboard
Copied
did you remove the other listener?
Copy link to clipboard
Copied
what do you mean
Copy link to clipboard
Copied
did you remove the code you had used before?
Copy link to clipboard
Copied
yes
there is just your code
Copy link to clipboard
Copied
it is like this
Copy link to clipboard
Copied
insert
trace("s") in that function and test your button.