?
Solved

Loop in Flash "set volume" sound object

Posted on 2001-07-12
6
Medium Priority
?
1,293 Views
Last Modified: 2007-11-27
hi,
 i've been using Flash5 's  new feature of sound object.
here i can only use a sound  that plays only once, i want that sound to play in continous loop... like 500 loops etc.  

 just because we don't put the imported sound on frame to use this feature.. we cannot use the conventional sound editor for making loops.  

 i just need a solution to make loops in "sound object> setVolume"  in flash, that controls the sound volume.

any expert tips ???

 Brain*  

 
0
Comment
Question by:Brain-storm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 3

Expert Comment

by:jeffbeasley
ID: 6278852
I don't believe there is a way to do this unless you Know the set frame length of your sound. If you do know the set lenghth of your sound then you could have an empty mc that in the first frame has

sound_loop= new Sound();
sound_loop.attachSound("some_sound");
sound_loop.start();

and in the frame that would be equal to the length of your sound gotoAndPlay(1);

I am testing some ways to accomplish this without the work around.

I will let you know if this can be done

Jeff


0
 
LVL 3

Expert Comment

by:jeffbeasley
ID: 6278944
never say never
I got it to work
I have an example file at
http://www.jeffbeasley.com/downloads
called sound_loop.fla
and sound_loop.swf

The scripting is below
Hope this helped
Jeff

Script

function sound_volume (input) {
     if (_root.sound_loop.getVolume()>0) {
          _root.sound_loop.setVolume(_root.sound_loop.getVolume()+input);
          volume = _root.sound_loop.getVolume();
     }
}
function sound_attach (loop_number) {
     sound_loop = new Sound();
     sound_loop.attachSound("sound_link");
     sound_loop.start(0, loop_number);
}
0
 
LVL 3

Expert Comment

by:jeffbeasley
ID: 6278954
If you need additional help let me know I also have a file called sound_fade that may help
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:Brain-storm
ID: 6282071
Hi Jeff:
 
 i really appreciate yur help. but the kind of .FLA u offered isn't the kind of result i need,  

 i just want the volume slider working with a loop .. continous loop..  like whenever the movie loads , the music starts as it loads and the music plays continously in a loop with a volume slider ...  slide it down > the volume gets LOW and slide it up > the volume gets high.... if u can find a solution .. pls inform

 BTW: always send yur tips as a comment.. never propose it as an answer ,, u never know what are the requirement on the other side :)

 thanx again for yur efforts.

 Brain*
0
 
LVL 3

Accepted Solution

by:
jeffbeasley earned 600 total points
ID: 6282397
I added the draggable volume  
the example file is at and named the
same as the other file was
http://www.jeffbeasley.com/downloads
 sound_loop.fla
 sound_loop.swf


Jeff
0
 
LVL 1

Author Comment

by:Brain-storm
ID: 6282632
Jeff:   you solved my problem...

    now i can actually set the code according to my need ,
thanks for yur help.

 Cheers !!

 *Brain-Storm
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question