-
Senior Member
Sound Loops
Hi!
I just downloaded a sound loop, but I want to make it loop with no gaps in a new game I'm making.
Can anyone tell me how to ensure there's no click, or pause?
Thanks
-
depends how your playing it:
dynamically:
var mySound:Sound = new Sound();
mySound.attachSound("soundname");
mySound.start(0,999);
mySound.start(0 = when the sound starts 0 straight away anything else creates a delay.
mySound.start(0,999=the total number of loops to play(999);
hope this helps a little.
NOW! look whats happened! I told you to watch this space and now its gone.
-
Senior Member
sorry, I have no idea how to use this script.
Do I reference the library name? I've imported the sound file to the library as "music_for_game". I just want it to play continuously without gaps.
Thanks.
-
right so its in the library?
right click the wav file then select the linkage from the drop down options
in this you will get a few options click the 'export for ActionScript' and in the two text feilds above (identifier and AS 2 Class) type in the name you want 'music_for_game', then press ok.(this is like giving it an instance name on a mc so the code above will find the right one.
right on the first frame simply put:
var mySound:Sound = new Sound();
mySound.attachSound("music_for_game");
mySound.start(0,999);// the 999 will loop it 999 times
if you then want to stop it put
mySound.stop();
hope this helps
NOW! look whats happened! I told you to watch this space and now its gone.
-
Senior Member
Yey!
i got it working thanks! (had to check the bottom box too)...
As an off-topic point, if you're in Plymouth, UK, I might be able to pass some Flash work on to you. please contact me via this link if you're interested: http://www.magic2k.com/email/email.php?userid=174
-
thats funny I have just noticed your location ha! ha! cool.
my e-mail: simon@levidyllan.co.uk
cool you got it to work :-)
NOW! look whats happened! I told you to watch this space and now its gone.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|