Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: Skipping Dialogue

(40 views • 2 replies)

This topic is 1 page long.

<< < > >>
None

Adidaas

Reply To Post Reply & Quote

Posted at: 7/3/08 11:41 AM

Adidaas NEUTRAL LEVEL 22

Sign-Up: 06/09/04

Posts: 688

I've been using the script
onEnterFrame = function(){
if(Key.isDown(Key.SPACE)){
_root.play();
}
}

to skip the dialogue in my movie, but when the space button is held down it tends to screw up the sounds and etc. I tried just using
if(Key.isDown(Key.SPACE))
{_root.nextFrame();}

but for some strange reason that doesn't work. Does that script not apply to 2.0 or what?


None

Kirk-Cocaine

Reply To Post Reply & Quote

Posted at: 7/3/08 12:07 PM

Kirk-Cocaine EVIL LEVEL 34

Sign-Up: 08/17/03

Posts: 16,475

This codes makes it so you have to tap space, rather than hold it down to proceed. I think it's what you're after.

SkipDialogue = new Object();
onEnterFrame = function () {
	SkipDialogue.onKeyDown = function() {
		if ((Key.isDown(Key.SPACE)) && (!pressed)) {
			pressed = true;
			_root.nextFrame();
		}
	};
	SkipDialogue.onKeyUp = function() {
		pressed = false;
	};
};
Key.addListener(SkipDialogue);

Further reading:

AS: KeyCode
AS: Listeners

AS: Main

HAVEN'T YOU GOT SOME OFF'S TO FUCK?

BBS Signature

None

Adidaas

Reply To Post Reply & Quote

Posted at: 7/3/08 03:04 PM

Adidaas NEUTRAL LEVEL 22

Sign-Up: 06/09/04

Posts: 688

At 7/3/08 12:07 PM, Kirk-Cocaine wrote: This codes makes it so you have to tap space, rather than hold it down to proceed. I think it's what you're after.

Not exactly what I was looking for, though that's pretty useful, I might use that later. Guess I should explain it better, basically rather having someone click a little arrow to proceed the dialogue I'd perfer to just be able to push the space bar, not tap, to proceed it.


All times are Eastern Daylight Time (GMT -4) | Current Time: 05:53 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!