Go Back   CodingForums.com > :: Client side development > Flash & ActionScript > Adobe Flex

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-20-2010, 10:06 PM   PM User | #1
bon_t
New Coder

 
Join Date: Jul 2010
Posts: 32
Thanks: 1
Thanked 0 Times in 0 Posts
bon_t is an unknown quantity at this point
Issue with replaying audio file at current position after pausing

Hello,

I am using Flex 4, ActionScript 3. In the AbstractPlayer.as class, the pauseTrack() method is as follows:

soundPosition.stop();
channel.stop();
mIsPause = true;
mPausePosition = channel.position;

I implemented the playTrack() method in Player.as, which has the following code right at the beginning:

if (mIsPause)
{
replay();
return;
}

However, when I press the Play button after pausing, the audio file is played starting at the beginning. When I stepped through the debugger, the mPausePosition value is still present when playTrack() is called, but the mIsPause flag has been changed to false. I checked through my code and verified that the mIsPause flag is not reset before the check in playTrack().

Does anybody have a fix / workaround for this issue?

Thank you,
Bon
bon_t is offline   Reply With Quote
Old 12-21-2010, 08:54 PM   PM User | #2
bon_t
New Coder

 
Join Date: Jul 2010
Posts: 32
Thanks: 1
Thanked 0 Times in 0 Posts
bon_t is an unknown quantity at this point
I looked at the code again, found the issue, and corrected it.
bon_t is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:38 AM.


Advertisement
Log in to turn off these ads.