Actionscript 3 :: Syncing Frames To Audio And Channel.position Acuracy?
May 30, 2009
Calling channel.position on an ENTER_FRAME event, I notice that it's not being updated every frame, but it looks more like every frame and a half.
var sound:Sound = new Sound(new URLRequest('music.mp3'));
var channel:SoundChannel = sound.play(); // assume the sound is completely,
// totally, 100% loaded
[code]....
View 1 Replies
Similar Posts:
Jun 13, 2010
When I go to test my video the audio and video are playing at different playback speeds. I'm trying to create a video using Flash that requires events based on the song itself. how to make the audio and video play at the same speed during Timeline playback and testing?
View 1 Replies
Mar 24, 2012
I'm making an animation in flash CS5, and everything went well with it until a certain scene, which is no different than the other scenes in terms of animation/audio. In that scene, while one character is finishing his audio sentence, the next audio line already begins, screwing up the animation to audio sync in the animation from that point on. This doesn't make sense because the line that begins too early, isn't marked to play until a few seconds into the NEXT scene. Why is this happening? I tried so many things and it's really frustrating that nothing is working. I tried changing the lines from even, to stream, from mp3 to wav, making scenes longer at the end, but no matter what I do, the next audio line begins really early, messing up the entire audio to animation sync of the entire video from that point on.
View 5 Replies
Oct 26, 2009
I have got a simple code that displays about three paragraph of text character by character.I need to sync it with audio. ie play the same audio that is displayed in the screen.What could be the best way to do so ?
View 2 Replies
Mar 29, 2011
I'm working on adding sound effects to a short animation. The first few sounds are syncing perfectly, however when I test the movie in Flash Player, at about the middle part of the animation, the sounds no longer sync; they play ahead of where they are supposed to. Testing the movie right in Flash, though, the sounds are fine. Exporting to a SWF file as well as a MPEG-4 also plays the unsynched sounds where they are not supposed to be
View 7 Replies
Nov 25, 2010
I was wondering whether MP3s or WAVs would be better to avoid syncing issues. Also, what audio stream settings would be best?
I was also wondering if you can manually play the audio track by moving the play head over it. I've tried multiple times with multiple settings to no avail.
View 1 Replies
Mar 30, 2009
I've developed an application which uses a (dynamic) XML file to load in several files; a maximum of four MP3 files and a number of JPG files.When everything has finished loading, the user can press a "Play" button. The application could be described as a "mixer"; it's used to give online music lessons and to facilitate this, the sheet music is loaded (cut up into into several JPGs) which move horizontally on the screen like a marquee, while the music it represents begins playback. The music exists of several MP3s so that the user can mute (e.g.) the vocals or the drums, allowing him to focus on (e.g.) the guitar.
So what's going wrong, is that the audio files are not playing in sync. They are all pre-loaded so any delay between files shouldn't be sought in the files not being fully loaded yet. For initiating playback in the application, I'm using a simple function with a for loop in it, which sets each instance of my sound class to start playing at position 0 of its timeline (I've added in highlighting for all of the "code" blocks in my post, to keep everything easy to read through):
Code:
function playSounds():void {
for (var iCnt:Number = 0; iCnt < aSound.length; iCnt++) {
// Start playback for each sound, at the time position set in the
[code]....
Seeing as this didn't work, I have no clue what I could give a shot next... so if anyone has any ideas or suggestions, it would be greatly appreciated! Something else I noticed, was that if I run the application on very fast PCs, the MP3s are almost always in sync, but the PC that I'm developing on isn't that sluggish either and they hardly ever run in sync on it - so it will form a problem for pretty much all of the people who will use the application.
View 1 Replies
Feb 21, 2010
I want to have a video with a different language on each channel, to give the viewer the possibility to switch dynamically. That's easily done with setPan, however you end up with the audio playing on only one channel, and that's pretty bad, specially if you watch in headphones. So my question is:
how do you take one channel from an FLV stream and send it to both speakers?
View 0 Replies
Jul 11, 2009
I have an mp4 file that i made and i made it 7.1 surround sound, and i'm pretty sure that this 7.1 surround sound works, as it can be played in VLC. i'm using netstream to load my files now. How do i make it so that flash can playback all 8-channels of sound?
View 3 Replies
May 26, 2011
I Am wondering if is possible to use one sound channel to play through an array of sounds? Perhaps by using a complete event or other means?
View 1 Replies
Jul 9, 2010
I have finally narrowed down a problem I've been annoyed with for some time.
Code:
var request:URLRequest = new URLRequest(url);
snd.addEventListener(Event.COMPLETE, completed);
snd.load(request);
channel = snd.play();
[Code]....
Duplicates... I have basically found it's not checking the mp3 frequently enough, no matter what the frame rate is set to. I've got this running at a steady 100fps. Before you say.. Yes it's actually running at that speed, if I use code to move something about, it's extremely smooth and fast. I also had the framerate reporting to a text box, and it was saying 99.9/100 constantly. I've also tried using a timer instead of Enter_Frame, but it's the same issue - Just not checking the mp3 often enough!
View 2 Replies
Sep 4, 2011
I want to know if it is possible to use javascript, flash or flex to make a youtube video player that is capable of controlling left/right audio channel volume. For example, mute the left channel and play right channel audio on both left/right speakers.
View 1 Replies
Aug 25, 2009
I have an audio player that has a custom timeline and playhead. I am using a start and stop drag to move in the time line but the only way i can make it work is to have it play when ever I release the play head. I would like it to stay stopped if the player is paused and play if the player was playing.
[Code]...
View 5 Replies
Apr 10, 2009
I'm looking for a way to automatically insert enough frames to span the length of embedded audio. Currently, when you add audio to the timeline in a frame, it doesn't expand the frames.
View 3 Replies
Sep 12, 2009
I'm putting together book in Flash. The audio starts with frame 2 but the naritive continues on frame 3 and 4. I can code a "next" button like so:
Code:
on (release) {
gotoAndStop(3);
[code].....
View 1 Replies
Sep 13, 2009
I'm putting together book in Flash. The audio starts with frame 2 but the naritive continues on frame 3 and 4.[code]...
Is it possible to have code to move to the next frame after a certain amount of time instead of a button?
View 14 Replies
Dec 8, 2010
I've been given a avi file that I've turned into an flv and now need to create two versions of that flv, one with all the audio and one with a small section of the audio removed (its narrated and we need to remove the mentioning of a specific item).
I know I can import an flv into the flash timeline but am not sure how to kill the sound for a given portion of frames,
Was considering redoing the flv as two separate flv's, one with video and one with audio and then putting them into the timeline and cutting the audio up, but I would love a cleaner way, preferably with ActionScript
View 1 Replies
Oct 6, 2009
Recently I bought CS4 as I decided that I wanted to design and create a new website for hosting my music productions, I have used dreamweaver in the past so I am quite familiar with XML etc but I wanted to make something with a little more to it. After talking to quite a few people and reading into it all I found that this would be my best option. After thinking that it was all going to be quite nicely straight forward Im banging my head against a wall in trying to learn and understand Actionscript.
I have currently designed all of the pages, I have used a few tutorials on actionscript 3.0 and have the whole website is functioning, my pages, frames, labels and buttons are all functioning how they should on the timeline and there is around 14 pages..
The problem i've had for around 4 days now is getting all of my audio previewssnippets to work, i have around 20 of these and I need them to be spaced out on about 6 pages (frames) ; Each frame is a different release etc
In each frame, I have 8 buttons 4X play buttons next to each track and 4xStop next to that... play_btn, play_btn2, stop_btn2 and so on..
I've set it so that all I want to do is be able copy the code into the other frames and also the buttons (which are on a different layer) and then all I have to do is enter the filenames in the code below (Track1.mp3, Track2.mp3 etc)
So... it all works fine on my first frame of my release page.. The audio plays and stops for each track, no problems at all.
Now,, the problem happens when i copy the actionscript from my first release page(frame) to the next.. its about 25 duplicate functions, duplicate variables etc
Is there some kind of way I can put all of this into some kind of Class or Tag.. And this code only operates inside this frame and not in the next to cause the duplicate errors? I realise that I could Label every single variable, function and button differently covering all of the frames so that it dosn't cause the duplications to occur but, I am hoping there is some other way around this..
import flash.media.SoundMixer;
//PLAY TRACK 1
var soundReq:URLRequest = new URLRequest("track1.mp3");
var sound:Sound = new Sound();
[Code]....
View 2 Replies
Nov 25, 2010
If I have a 2 minute audio, and I want to scrub the animation frames around the 1 minute point, to see how they coordinate with the audio, is that possible?
View 3 Replies
Dec 18, 2009
I am calling some streaming video on frames 1-11 to play for a multiple choice game. My video and audio are out of sync at times on frames 3-11? [code]...
View 1 Replies
Sep 14, 2009
What I'm looking to happen is that on frame 2 I want audio track 1 to play and:
after 1 min 45s move to frame 3
after 1 min 51s move to frame 4
after 2 min 47s move to frame 5
after 3 min 15s move to frame 6
How would I code this or what would be the easiest way to do it??
View 6 Replies
Feb 11, 2011
I'm trying to modify many .fla files (in CS3) that have a voiceover layer on them. Because I'm adding or deleting other items on the stage, I need to adjust the audio fo synch with the modified flash file. I have tried deleting frames and this happens - I select the unwanted frames, such as frames 200 to 300 of a 500 frame file. Then, the audio from frames 300 to 500 (at the end of the file) gets deleted instead.
I need to create gaps (like 200 frames of no sound) in the audio (.wav) file so I tried adding blank frames. When I click on "insert frames" in the middle of the timeline, Flash adds the new frames to the end of the sound timeline.
I also tried adding a keyframe at the beginnig of the range and Flash deleted all the frames after the keyframe.
It looks like any modification to the sound/audio layer only affects the end of the timeline. How do I modify sound parts in the middle of the timeline? I know this can be done but how?
Details: The audio layer (.wav) runs the whole length of the Flash file. The .wav file is a sound file in the Library; 22kHz Mono 16-bit 27.4s 12.1kb. The files were created in CS3. These files work fine.
View 1 Replies
Aug 18, 2010
I have developed an application using various FMS2 Communication Components. One of those is the Chat component. The application has various display modes (minimized, normal, maximized). These display modes require the Chat component instance to be resized and repositioned on the screen. I took the approach of having a separate frame represent each of the display modes.
The problem I am having is that the Chat component won't resize or relocate from the size/position on the first frame. The visual layout isn't respected, and calling this.moveTo(x,y) has no effect either. The only way I can get the component to have the desired behavior is to comment out the last line of the Chat component actionscript[code]...
View 2 Replies
Jun 28, 2011
How can I drag the key frames back within each of the layers below so that they all end on the final scene. Currently when I hit play, the clip runs till the last key frame and the other layers that don't run that length disappear. How can I best fix this?
View 2 Replies
Jul 28, 2010
if I want to play/test only 30 frames of 100, is it possible to hear the audio that just pertains to those 30 frames? Or is this only possible, IF the audio segment STARTS WITHIN those 30 frames?
View 2 Replies
Apr 30, 2009
Back in 2007 I was using a script that allowed me to store in the browser's cache a specific frame, so that when I navigated through different static html pages, it would remember to not "load" (if you will) the first half of the movie.
I am working on a site that has flash elements, one being an audio player, another being popup navigation.
Does anyone have or know of a script that will allow me to do two things:
1) remember a position page-to-page via browser caching (so the navigation won't pop up every time)
2) allow the audio player to remember its last position and whether it was muted or not.
This is what I am using to pause/play the audio:
Code:
var mySound:Sound = new Sound();
mySound.attachSound("track1");
mySound.start();
[Code]....
View 1 Replies
Aug 10, 2010
I'm having a problem that is kind of hard to explain. I have a player character on the stage and a player class controlling the character. He moves right responding the the keyboard input fine, but when he moves left, the character has to face right for one sequence during the animation. There is no faceleft position in any of the numbers representing frames in the array controlling the walk left animation so I don't know why the player character is doing this. Here's some of the code I am using.[code]
View 3 Replies
Jun 8, 2004
I know this can't be to hard too achieve, but my actionscript skills aren't quite up to it yet.
- I have 5 frames within a MC.
- In this MC there is text saying "center", "left", "right", "up", "down" on each frame.
- All I want to be able to do is make the MC change to frame 3 "right" when my mouse moves to the right of the MC.
I know the script below is wrong, but would it go something like, this. Would I have to use angle and math or is there a simpler way to achieve this?
onClipEvent (mouseMove)
get x position
get y position[code]......
View 1 Replies
Jun 8, 2004
I know this can't be to hard too achieve, but my actionscript skills aren't quite up to it yet.
- I have 5 frames within a MC.
- In this MC there is text saying "center", "left", "right", "up", "down" on each frame.
- All I want to be able to do is make the MC change to frame 3 "right" when my mouse moves to the right of the MC.
onClipEvent (mouseMove)
get x position
get y position
if statement x= > -180 and y=> 0 (something like that)
_root.myMovieClip.gotoAndStop(3)
View 1 Replies
Aug 6, 2010
If I import an FLV video is there any way to remove the audio, put the audio into a byte array, and then re-add the audio to the flv video?
View 1 Replies