Copy link to clipboard
Copied
hi everybody!!!
i'm writing code for up and down speed of song....
for play of song i write this code:
public function playMC(evt:MouseEvent😞void
{
target= new ByteArray();
var url:URLRequest = new URLRequest("C://song.mp3");
mp3Start = new Sound();
mp3Start.addEventListener(Event.COMPLETE, complete);
mp3Start.load(url);
position = 0.0;
rate = 1.0;
sound = new Sound();
sound.addEventListener(SampleDataEvent.SAMPLE_DATA, sampleData);
}
public function complete(event:Event😞void
{
channel = sound.play();
}
this code is good for only play and stop song....i want add pause song....how to do??
help me please!!!!
There is no pause function. What you need to do is stop the sound and remember where you stopped so that when play is resumed you specify where to start. Here is a help document that explains it:
Copy link to clipboard
Copied
There is no pause function. What you need to do is stop the sound and remember where you stopped so that when play is resumed you specify where to start. Here is a help document that explains it:
Copy link to clipboard
Copied
thank's very much!!!!!!
i haven't think to resume play....
thank's!!!!
Copy link to clipboard
Copied
You're welcome
Copy link to clipboard
Copied
hi!!!
now i have another small problem...
i want add one timer ans progressBar...
for add time i write this:
public function getCurrentSong(evt:TimerEvent):void
{
currentSong.text = convertTimer(sound.position);
}
but don't go same time!!!!
and how to use the sliderBar or progressBar in this player???
help me please!!!!
Copy link to clipboard
Copied
You should start new postings when you have new issues you want to resolve.
What have you done for the Timer coding? What other code supports that function you just showed (what does convertTimer do?)?
Copy link to clipboard
Copied
hi!!!
sorry!!!
now i will write new issues...
Copy link to clipboard
Copied
Nothing done that you need to be sorry about. It is better to start new postings for the benefit of others that might be having a similar problem. That's one reason why titling your posting to reflect the issue is important.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now