Solved

Loop in Flash "set volume" sound object

Posted on 2001-07-12
6
1,264 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create a simple "throw object" gesture on as3 / air mobile ? 3 1,180
FLV versus SWF 11 277
Virus or Outlook 2007 problem, how to tell? 8 82
flash in chrome 4 99
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

786 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