Solved

Loop in Flash "set volume" sound object

Posted on 2001-07-12
6
1,245 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
  • 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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 200 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now