Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

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


Forum Topic: Repeating audio

(47 views • 4 replies)

This topic is 1 page long.

<< < > >>
None

orezblades

Reply To Post Reply & Quote

Posted at: 5/3/08 11:17 PM

orezblades NEUTRAL LEVEL 02

Sign-Up: 04/07/08

Posts: 8

my flash code looks something like this:

var myJam:Sound = new Sound();
myJam.loadSound("Rig.mp3", false);
myJam.start();

How do I get the sound to auto-repeat?


None

darkjackel

Reply To Post Reply & Quote

Posted at: 5/4/08 07:41 AM

darkjackel DARK LEVEL 05

Sign-Up: 11/10/07

Posts: 8

uuuuummmmmmmmmmmm oooookkkkkkkkkkkkkkkkkkk .........i have no idea XD


None

geohoundz55

Reply To Post Reply & Quote

Posted at: 5/4/08 08:06 AM

geohoundz55 NEUTRAL LEVEL 10

Sign-Up: 05/31/07

Posts: 229

At 5/3/08 11:17 PM, orezblades wrote: my flash code looks something like this:

var myJam:Sound = new Sound();
myJam.loadSound("Rig.mp3", false);
myJam.start();

How do I get the sound to auto-repeat?

I can make repeating audio, but not using AS so I can't help,.


None

knugen

Reply To Post Reply & Quote

Posted at: 5/4/08 08:41 AM

knugen LIGHT LEVEL 29

Sign-Up: 02/07/05

Posts: 3,104

You can't make it loop forever with code, if that's what you mean, but almost:

myJam.start(0, 99999);

As you might understand, the second argument for the start method is what's telling it how many times to repeat; if you want the sound to play twice, just change 99999 to 2.

In case you're wondering, the first argument is the second offset, it simply tells how many seconds of the beginning of the sound that should be skipped, i.e. if you have a sound clip with a silent part before the actual sound kicks in.

They used to call me DreamworX..

BBS Signature

None

orezblades

Reply To Post Reply & Quote

Posted at: 5/5/08 01:33 AM

orezblades NEUTRAL LEVEL 02

Sign-Up: 04/07/08

Posts: 8

K thanks, I ended up doing that.


All times are Eastern Daylight Time (GMT -4) | Current Time: 06:35 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!