Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems looping wav file

Status
Not open for further replies.

thecrock

Technical User
Apr 13, 2007
15
I am trying to make a sound file loop x amount of times while my movie plays, I create a new layer and click in the first frame of it and then drag my wav file onto the stage.Then in properties I check START in the sync options and loop is set to 10. No loop, does anybody know where i'm going wrong.

peace
 
Overall you'll save movie space if you just use Flash to stream the file on loop. This is the code that you'll need.
(s= arbitrary variable)

s = new Sound(); //initializes a new sound
s.loadsound("c:\yourpathhere\file.mp3", true); //loads sound into player, uses URL, the true/false value isStreaming tells the player if the sound is streaming
s.start; //starts the sound file


Of course, there is another way. If you would like to load the file into the library you can use a runtime variable to attach the sound and play it. You'll need to right click on the file you want to play in the library and give it a linkage identifier (in this case linkname).

s= new Sound();
s.attachSound("linkname");
s.start(0,2); //the values for the parameters are (offset, number of loops);


Hope either works. If not, repost and I'll supply what help I can.
 
Thanks Dluman
I dont want to write a script, I should be able to loop the sound by adding a number in the loop box in its properties.

Yes?

This is not working.


Peace
 
That doesnt work.The sound only plays once.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top