Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-03-2010, 12:56 PM   #1
Registered User
Join Date: Feb 2010
Posts: 8
Default Looping sounds?

Simple question.

How do i play a sound and make it loop over and over?

Glenn1990 is offline   Reply With Quote
Old 04-03-2010, 01:18 PM   #2
Senior Member
Join Date: Nov 2009
Location: Lichfield, England
Posts: 284

Use the SOUND_COMPLETE event and then, in its event handler, arrange for the same sound to play again.
julianboolean is offline   Reply With Quote
Old 04-03-2010, 04:01 PM   #3
What's up pussycat?
matbury's Avatar
Join Date: Dec 2006
Location: Toronto, Canada
Posts: 1,990

Hi Glenn1990,

There's a very simple way using Sound.play(start:uint,loop:uint);

ActionScript Code:
var sc:SoundChannel = sound.play(0,1000); // start at 0, loop 1000 times

1000 times should be enough, unless it's a very short sound, in which case make the number bigger!
matbury is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:56 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.