?
Solved

Do not want the sound to loop.

Posted on 2003-11-09
8
Medium Priority
?
235 Views
Last Modified: 2010-04-03
Hello,
I made a flash movie and added sound in the movie which start in middle and goes till the end. But the problem is that when the movie is over, and the sound also stops automatically but starts again but the movie does'nt loop. I mean to say when the movie stops, the sound loops but the movie does'nt. I want the sound not to loop, it should be played once only.
0
Comment
Question by:Phud3
[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
8 Comments
 
LVL 27

Expert Comment

by:negatyve
ID: 9710581
How have you added your sound?
0
 
LVL 1

Author Comment

by:Phud3
ID: 9710792
my sound?... meaning here my own sound through mic?
I added a sound clip which is in .mp3 format.
0
 

Expert Comment

by:Rouneh
ID: 9712096
Have you put it in your timeline, or are you loading it through actionscript?
0
Industry Leaders: 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 39

Expert Comment

by:blue-genie
ID: 9712846
you need to attach your sound using a sound object ie.

function playSound() {
      s = new Sound();
      s.attachSound("test"); //where test is linkage ID in library
      s.start(0, 1); // this line tells it to play only once.
}
0
 
LVL 1

Author Comment

by:Phud3
ID: 9714244
Rouneh, yes, I have added the sound directly onto the timeline on a new layer.

Blue-genie, the code you gave where exactly should i paste it?

Thanks,
Later.
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 9714314
Phud3 - I'm assuming you're using MX or later - first thing you want to do is take it out of the timeline.
then locate it in the library, right click and select linkage. give it a linkage name, and make sure the first and last box is checked.

Then paste the playSound function in the timeline where you want the audio to play. If you have a keyframe that extends through the length of the movie, you can paste it in the first keyframe, then in the keyframe where you want the audio to start, call the function ie.
playSound();

that should do the trick.
0
 
LVL 1

Author Comment

by:Phud3
ID: 9738344
bah, I am confused. Blue-genie you asked me to make a linkage of the sound file in the library. I did it. Then i removed the sound from the sound timeline, meaning I cleared all the frames in the sound timeline and inserted a new keyframe at frame1 in the sound timeline. Then, i pasted the whole code which you stated above in the actions of that blank keyframe. Then, using the mouse pointer i dragged that 1st frame to the frame number where i wanted the sound to start playing. I changed the linkageID name to the name i gave to the soundclip while making a linkage but still when i previewed the movie it did'nt play the sound when it had to. And the  the function you gave in the last post ie playSound(); how do put this fuction in place of playSound() {. I am not able to edit.
Please help me out.
One more thign, when you publish the movie, I set the settings of the Flash allignment to be centre and centre. But in the webpage it comes on the top left corner. I want it to be in the centre of x axis and centre of y axis. How do you do this?

Thankyou so much,
Phud3.
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 40 total points
ID: 9738449
no Phud.

the function can sit in the first key frame. What you want to do is call the function at the frame where you want it to play, so let's say on Frame 30, the audio must play, so on frame 30 insert the function call ie. playSound();


that's all, the only thing  you need to change in the function is the id which you've done.

so again.
in Frame 1.

function playSound() {
     s = new Sound();
     s.attachSound("test");
     s.start(0, 1);
}

in frame to start playing i.e. frame 30
playSound();


0

Featured Post

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!

Question has a verified solution.

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

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
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.
Suggested Courses

777 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