Solved

AS3 replay sound from beginning

Posted on 2011-02-22
2
840 Views
Last Modified: 2012-05-11
I have a play button that I need to have replay the sound from the beginning after SOUND_COMPLETE. I can reset the button to play, but my progress bar doesn't reset and clicking play doesn't replay the sound.

I'm getting to my soundComplete function, but can't seem to get it to do what I want it to.
Thanks!

(the large-ish .txt file is actually the .mp3)
A-200.zip
0
Comment
Question by:pixystk
2 Comments
 
LVL 17

Accepted Solution

by:
deepanjandas earned 250 total points
ID: 34961046
Replace the function soundComplete with this one:
function soundComplete(event:Event):void
{
	trace("done!");
	controls.gotoAndStop("play");
	trace(progressBar.scaleX);
	progressBar.scaleX = 0.00;
	
	isPlaying = false;
	pausePoint = 0;
}

Open in new window


Warm Regards
Deepanjan Das
0
 

Author Closing Comment

by:pixystk
ID: 34961945
Thank you!
missed setting isPlaying to false.
Thanks
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

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 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. …
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 how to record live broadcast.

895 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

13 Experts available now in Live!

Get 1:1 Help Now