ActionScript 3.0 :: Position Working, But When Resumed / Sound Rewinds A Little
May 28, 2008
I have a pause button that pauses a sound playing in a sound channel. It works, but when I resume the sound, it isn't in the correct position, almost like it was rewinded a little.[code]
View 3 Replies
Similar Posts:
May 28, 2008
I have a pause button that pauses a sound playing in a soundchannel. It works, but when I resume the sound, it isn't in thecorrect position, almost like it was rewinded a little. I'm usingthe code straight from the
View 1 Replies
Jun 19, 2006
I have currently a music player that uses Sound.position and Sound.duration to use as a playlist. However, the sound is streaming, so then Sound.duration is the number of loaded seconds/miliseconds. Is there a way for me to figure out the duration of a sound without fully loading it? Right now, it really messes up the playhead.
View 2 Replies
Apr 28, 2003
I am trying to get mp3 sound position and sound length to work. Heres the code below and I ahve attached the FLA.
Code:
// Create a new Sound object.
var music = new Sound();
// Create a text field to show sound length.
[Code]....
I have attached my FLA file. You will need to through a MP3 in the same dir as swf file names test.mp3..
View 1 Replies
Feb 3, 2009
I am trying to call a sound to play whenever the UP key is down. I want the sound to stop and reset to position zero when UP is released. Everything works except the sound will not reset to 0. Here is what isn't working:
if(Key.isDown(Key.UP)){
if(sound.position == 0){
sound.start(0,0);[code]....
When ran, the program plays the sound once, and will never play it again because I can't get the sound.position to reset to 0.
View 1 Replies
Oct 25, 2005
Just to start off, this isn't exactly an inquiry to a problem. It is moreso of a posting of a bug (or assumed bug) in the Flash player and how to get around it. Though if anyone else has a better method then share. Ok, well I very rarely ever work with the Sound() object in Flash, and I found myself working with it today. I was having a problem and I could not pinpoint it for the life of me.... my code appeared correct in every aspect.
After tracing many sections of my code to find out where it was going wrong I realized... that for some reason when you use Sound.stop(), the Sound.position doesn't get reset... it instead just increments from where it left off. This is quite annoying. And being that Sound.position is a read only property you can't reset it yourself. The only solution I have found for this is to delete or overwrite your Sound() object with a new Sound() object. Anyone know if this is indeed a bug, or if there was some reason Macromedia did it like this?
View 9 Replies
Aug 26, 2006
I am using previous/next buttons to navigate through various screens. Each screen has its own voice over track.If I hit the "Next" button in the middle of the track playing, then try to go back, the audio won't play - most likely because the position is still sitting at wherever it was when the sound was stopped.Is there a way I can reset the position? I am assigning the positiong to a variable (mySoundPosition), and have tried stting it to 0 (mySoundPosition=0), but that doesn't seem to help. I know that the position is read-only, so I was hoping that somehow clearing the value of the variable would work.Basically, I just need a way to start the sound over without having to envoke multiple start(); commands because that causes the sounds to essentially play twice, simultaneously, which doubles the volume.
View 13 Replies
Jul 24, 2011
Is there any code in as3 that sets the volume by x&y- coordinates of the mouse?So that my sound is in a MC, and how closer my mouse is at the MC, the louder the volume gets?
View 4 Replies
Jan 10, 2009
I have created a document 600x300 filled with buttons for a rollover effect. I want to be able to play sounds dependant on the x and y position of the mouse without having to use objects that interfere with the buttons.
View 2 Replies
Nov 26, 2009
is there a way in as3 to mute a video inside a movie clip if the mouse x position equals less than, say 200px?
View 1 Replies
Sep 11, 2011
I have the following working great:
stop_btn.setStyle("icon", square_mc);player_btn.setStyle("icon", next_mc);
import flash.events.Eventimport flash.events.MouseEvent;import flash.media.SoundTransform;
var alreadyDefined:Boolean;volumen.value = 1;
[Code].....
I have another slider component on the movie with instance name PROGRESO
I would like for PROGRESOnto indicate (update) the sounds progress as it plays and be able to scrub through the sound.
View 7 Replies
Oct 17, 2006
Basically I have an XML file that contains the paths of a few mp3 files. I have a Play button that plays them and a Next button that plays the next song on the list. These buttons work fine. I actually even am able to obtain and manipulate the songs position using the mySong.position property in order to display the songs position in the form of minutes and seconds.My problem is that when you click Next to go to the next song, the mySong.position property does not reset back to zero, like it should. So if you are 12 seconds into a song and you click NEXT, the next song starts to play fine, but the display keeps counting up from 12 seconds. I realized the .position property is read-only, so I cannot change it. If this is the case, then how does it ever reset, what causes it to reset?
I am loading the songs via the loadSound() method. Which means my only code on the Next button (other than to update some other displays) is:Code:mySound.loadSound("file.mp3", true);I do not need to use mySound.stop() to stop the previous sound, or even mySound.start() to start the new sound playing, it starts automatically. I tried using those commands and got the exact same results, the position property still did not reset.Am i missing something? I sure hope its painfully obvious and I just overlooked something simple cuz im getting a headache
View 9 Replies
Mar 16, 2010
I`ve run in a bit of a problem. I`m trying to make a web player in AS2. It stores some data from player for later usage in a shared object. One of the things i`d like to store is my current playing position, so player can start of where it was playing after page reloads, but i can`t think of how it should be done..
[Code]...
View 0 Replies
Aug 4, 2010
I am following this tutorial (Url...) on how to build an audio mixer in Flash. I am trying to display the duration/position of one of the sound objects in the mixer (all sounds in the mixer have the same length). I have tried adding this code to the actions under frame label "ready".[code]I have two dynamic text fields named Text01 and Text02 on the main timeline. Yet, nothing populates.
View 2 Replies
Jan 20, 2010
I load a song and when I get the length the song never reach this value.Here is issue document by another guy AS3 - SoundChannel.position never reaches Sound.length.And here is my code
import flash.display.Sprite;
import flash.net.URLRequest;
import flash.media.Sound;[code]....
View 2 Replies
Aug 18, 2010
does anybody maybe know how to track/trace the current position of a sound file while it is playing?So that it is updated every frame or second?I figured something with trace(sound.position) onEnterFrame, but didn't succeed in realizing this yet.
View 1 Replies
Jan 20, 2011
If you wanted to create a client-side Flash-based sound editor that lets you load more than 1 sound to an interface that allows you to manipulate the individual positions of the sounds, and mix/play them in real time, how would you accomplish this?
I'm looking to create a simple version that can mix 2 mp3s, allowing the user to adjust the positions of each. Sort of a dumbed down version of Aviary's Myna audio editor.
At the end of the mixing, I would also like our server to mix the 2 mp3 files with the proper positioning into 1 mp3 file...
View 1 Replies
Jun 6, 2008
I'm streaming an external SWF into another movieclip, the external SWF has a timeline animation and sound (voice speech) as well on the timeline, it also has a preloader on it which it's set up that when 30% loaded is completed to start playing the animation.But when I run the main movieclip the streaming of the external SWF works fine for the animation but the sound does not play until the preloader is 100% completed.
View 1 Replies
Apr 28, 2011
I was trying to import sound file in mp3 format to my flash.It is working fine but after I testing the movie the sound doesn't work.
View 2 Replies
Apr 16, 2010
I am trying to use the id3 tags from second table, output display undefined..
var sound:Sound = new Sound; var url:URLRequest = new URLRequest("1.mp3"); sound.load(url); var player:SoundChannel = sound.play(); sound.addEventListener(Event.ID3, id3Listener); function id3Listener(event:Event) { var info:ID3Info = sound.id3; trace(info.TIME);
trace(info.TRDA);
View 2 Replies
Mar 27, 2012
i did this
package{
import flash.display.MovieClip;
import flash.events.MouseEvent;[code]...
it works but only one time i wanna the sound keep working after finished
View 5 Replies
Mar 18, 2010
This is what I have as far as code, it is in the first frame of the movie.
nature = new Sound(this);
nature.attachSound("sound_naturally");
nature.setVolume(50);
[Code].....
I have the sound exporting to ActionScript with the link identifier 'sound_naturally', not exported to the first frame. I don't understand why it's not working. I did like the exact same thing like 3 hours ago and it worked fine, but I lost the file so I had to redo it and now it won't work at all.
View 2 Replies
May 1, 2004
I have the following problem. I have a attachSound for three wav files in the library. This is the code:
Code:
song1 = new Sound();
song1.attachSound("song1");
song2 = new Sound();
[code].....
This is also working.When I press the button the music stops. When I press the song1 button, song1 start playing again. But when I press on of the othet two buttons nothing happens. This is the code for the buttons:
Code:
on (release){
_root.mc_menu.song1.start();
_root.mc_menu.song2.stop();
_root.mc_menu.song3.stop();
}
View 5 Replies
Apr 7, 2003
I came accross this very comprehensive webpage about sound objects in flash mx about a month ago. Since there has been 2 or 3 threads started about working with sound just today, thought i'd share it [URL]..
View 5 Replies
Aug 5, 2003
firstSound=new Sound();firstSound.attachSound("****");
that's easy...did the linkage thing and it doesn't work..did it with another mp3 file and it worked fine..any idea on what can be causing this particular mp3 not to work when attached with AS?
View 2 Replies
May 1, 2004
I have the following problem. I have a attachSound for three wav files in the library. This is the code:
Code:
song1 = new Sound();
song1.attachSound("song1");
[code]...
View 5 Replies
Apr 11, 2009
I have a button that rotates a wheel 90 degrees each time the button is pressed. What I'm trying to do, is play a sound when the wheel stops at each rotation. So something like this:
Wheel rotates to 90 degrees.
90 degrees = sound #1
Sound #1 plays once.
The rotation works fine, but the problem is, when I tried to do this I put in a statement that with my wheel named "wheel" if wheel.rotation==90 play my sound. But my sound keeps looping and SOUND_COMPLETE is not firing to trigger it to stop.
[Code]...
View 4 Replies
Dec 6, 2009
I imported a .aif sound in to my library and gave it a class name of "Beat". I'm using this sound as a rollover effect. So I have my variable initiated at the top like so:
Code:
var snd:Beat= new Beat();
My listener's function like so:
[code].....
View 1 Replies
Feb 17, 2011
I have a loaded swf which contains sound on its frame. Even though I have unload it, the sound still playing. I cannot get rid of it. I've tried:
- _loader.unloadAndStop();
- SoundMixer.stopAll();
- System.gc();
View 1 Replies
Apr 10, 2009
I have a scene with a voice over. I have split the voice over in to multiple sound files (mp3). The voice over plays correctly as long as you don't use the btns. When the forward btn is used the the file goes to the correct frame in the timeline but won't play the sound. Next issue, after pausing then using play the scene plays but without sound.
[Code]...
View 5 Replies