Be a Supporter!

Help... please.

  • 287 Views
  • 1 Reply
New Topic Respond to this Topic
Waggit
Waggit
  • Member since: Oct. 21, 2005
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Help... please. 2009-03-24 06:24:56 Reply

Hello, here is my problem I have a movie clip which contains a button. This button needs to either play back the last 6 frames in reverse and stop, or play the next 6 frames then jump back 12 frames and continue playing. I would be very great full for any help. (I'm very poor at actionscript so dumb it down for me)
Thanks for any help.

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to Help... please. 2009-03-24 07:28:29 Reply

For the backwards bit, add this to the button actions:

on(press){
	_root.GOBACK(this);
}

on the main timeline, add this function:

function GOBACK(mc){
	mc.cnt=0;
	mc.onEnterFrame=function(){
		if(this.cnt<7){this.prevFrame();}
		this.cnt++;
	}
}

For the going forwards bit, add this to the button actions:

on(press){
	play();
}

Then add this to a frame in the MC, 6 frames on from where the button is:

gotoAndPlay(_currentframe-12);

- - Flash - Music - Images - -

BBS Signature