Solved

Loop in Flash "set volume" sound object

Posted on 2001-07-12
6
1,255 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Crash with shockwave flash 8 236
Adobe Flash Free Transform Tool 2 128
Embedded Webpage Videos don't auto play on Windows 7 1 103
Adobe Flash Player ActionScript error 6 60
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 my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
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.

932 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

9 Experts available now in Live!

Get 1:1 Help Now