Actionscript 3 :: SoundChannel.position Inaccurate?

Jun 8, 2011

EDIT: Sorry for the question being reworded, but I am just simplifying the issue. I am not getting accurate values for SoundChannel. position for an external MP3 that is playing.I've tried a variety of audio bitrates and consistently,i am getting a SoundChannel.position that is less (~250 ms) then where the actual audio has played to. As well, the position never equals the duration. It always finishes behind, even when the SOUND_COMPLETE event is generated.

Adobe says any Sound position/duration issues are fixed with the latest Flash Player. I am obviously not getting the same results. I need very accurate position values in order to have a custom draggable timeline and cue points.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Save The SoundChannel.position Number (and Also Call SoundChannel.stop()) In Correct Time

Dec 6, 2008

I just finished a simple music player... For testing purposes. I upload it in the following address:http:[url]....with 10 music songs that I had recorded from radio stations(added the last 2 twice for testing).The problem is that when a song has totally loaded, stop action taken needs about 1 second to be applied!I.e. When I press "STOP", the sound continue to play for 1 sec before stop. When I push "pause" it takes one second for the music to stop!

However when using resume (second time pause) the sound starts instantly! Thus I guess there is an issue with stop()function of the SoundChannel object that I am using to stop the sound. Also notice that when unpause the music, it continue ~one second before the last sound - which means that I saved the soundChannel.position number (and also call soundChannel.stop()) in correct time, but it didn't stop immediately - bug!?

This only happens when the application runs through a browser(plugin v. 10) - programmed in CS3.

PS1. Notice that ,this also happens when I change Volume too. Thus because Stop and Volume are parts of SoundChannel, I guess there might be a bug with SoundChannel in online plugins..... :/

PS2. Notice that ,this also happens when I close the browser (firefox). Even if browser is closed the music continue for 1 sec the same way as when pressing stop!.. Thus I guess it's flash bug!...

View 2 Replies

ActionScript 3.0 :: Soundchannel.position Working, But When Resumed, The Sound Rewinds A Little?

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

Flash :: Differences Between Sound.length And SoundChannel.position In ActionScript 3?

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

CS3 Inaccurate Stage Size With Text?

Nov 11, 2009

When I type text on the stage, especially long sentences, and Match Contents in Document Properties, the stage size is always off. See attachment.

Is this a common Flash problem, and what's the best way to deal with it? (CS4)

View 17 Replies

ActionScript 3.0 :: Inaccurate Seekbar And Duration?

Aug 5, 2011

I've been programming with AS3 and done something that I haven't done before, Flash Video Player. I found some source code from this site and tinkered it a bit. Here's the script below.

ActionScript Code:[code]....

The problem is, when I move the scrubber, it doesn't load the duration accurately wherever I scrub it. If that makes sense? Is there something that I'm doing wrong? The width of the SeekBar is 728px.

View 0 Replies

Actionscript 3 :: Flash Game : GetTimer Inaccurate

Jan 17, 2012

I'm working on the game. The gameplay is based on a really small time lapse (you have only 5 secondes to do an action). My timer works great in Flash Player, i DO have 5 secondes. In a web browser (firefox, safari ..) the 5 seconds timer is now 8 seconds.

[Code]...

View 1 Replies

ActionScript 3.0 :: Inaccurate Pixel Values Using GetPixel?

Sep 18, 2008

I'm writing an applicaton which acts based on different colour values of pixels in a png image created in Microsoft paint. However, when I load the image into a BitmapData object, and then parse through the pixels reading their values using getPixel() or getPixel32() (I've tried both) I seem to be getting values which are slightly inaccurate compared to what was saved. For example a pure white pixel which should be read as 0xFFFFFFFF often comes out as 0xFFFFFFFE. The behaviour of the program is dependent on the exact value of the pixel so these errors usually break it.

Sometimes the problem is intermittent so seems fixed but actually isn't. Is it to do with the PNG format? I thouht png was lossless so should deliver accurate pixel values at all times?

View 5 Replies

ActionScript 3.0 :: Timer Really Inaccurate - Allows To Load One Or More External Swf(s)

Mar 24, 2010

I am building a pretty heavy application that allows me to load one or more external swf(s). To remove the swf(s) from the main stage I have built a button. The purpose of this button is that the user has to hold it down for a short while to prevent accidentally removing the swf loaded. In my button class I had set a timer that would start when a MOUSE_DOWN event is fired. The timer itself has an event listener TIMER added that "ticks" every 1 ms. The main problem is that it just doen't do this. The timer function fires at (as it seems to me) much long and random intervals that are also different for each swf that is loaded. So a heavier swf results in the timer being fired even less often and a thus a lot more inaccuracy. Does anyone of you have an idea on how to fix my timer issues or just have a better idea on how to achieve the delay i want to build in the button.

View 4 Replies

ActionScript 2.0 :: Driving Game Inaccurate Hit Test?

Oct 21, 2003

I have this experiment with a Jeep in a small drivable area with a garage thing.What I wish to happen is that the hit test for the Jeep to be more accurate so when you are inside the garage the front or the rear of the **** jeep doesn't stick out half a mile or when you hit the edge wall it doesn't act off the **** centre/registration point.

I set up a hit-test test but with a square symbol and when you hit it, it is accurate because it doesn't use the jeeps centre/ registration point why can't I implement this on the jeep or can I, If so How? - Look at the .fla with the white squares.And also how would I implement it so that if the area was slightly bigger the background would move around the jeep. Like an art based rpg not tile based, or should I use tile because it is easier?t.

View 3 Replies

ActionScript 3 :: Inaccurate Mouse Coordinates Of Display Object?

Jul 29, 2011

When tracing the mouseX / mouseY or localX / localY coordinates of a display object, why does x start at 1 while y starts at 0? For example, I've drawn a simple 400 x 400 pixel sprite onto the stage with a MouseEvent.MOUSE_MOVE event listener that calls a handler function to trace the local coordinates of the mouse. The first, top-left pixel returns {x:1, y:0} and the last, bottom-right pixel returns {x:400, y:399}. Shouldn't both the x and y start and end with the same value? I'm not sure which makes more sense for a the first mouse coordinate (either 0 or 1) but it certainly doesn't make sense that they are different?

[SWF(width = "1000", height = "600", backgroundColor = "0xCCCCCC")]
import flash.display.Sprite;
import flash.events.MouseEvent;
var darkBlueRect:Sprite = createSprite();
darkBlueRect.x = 23;
[Code] .....

View 1 Replies

ActionScript 3.0 :: Flash Senocular's Path.as Points In Curves Seem Inaccurate

Aug 22, 2010

I'm working with Senocular's Path.as file and I notice that the points that it outputs on curves are not very accurate. [URL] The code has a variable for curve accuracy in there and I have tried changing it but if I set it to 1 or to 500 it doesn't effect the placement of objects on the curve.

Basically what I am doing is putting beads on a necklace and pushing them through a curve. Kinda like in the game Zuma. However when I set the positions of the beads to go up incrementally there seems to be a slight burst of speed on the curves, that speeds up at the ends and slows in the middle a little. I was wondering if anyone had any pointers on how to make the curves more accurate with this script? It is a hell of a good script by the way I'm sure I'm just stupid and not seeing something.

View 6 Replies

ActionScript 3.0 :: Sound Name From SoundChannel

Apr 17, 2009

I wondered if there is a way to find out from the soundChannel the url of the sound it is currently playing. once I found out its url, i can than use its name to call something else.Or anyway to find out the sound that is playing on a soundChannel.I will know which channel to look into, but different sound will be loaded into this soundChannel.If this is not possible, i thinking along the line of overloading SoundChannel play method so that is fires an event when the sondchannel plays and also find out the name of the sound file it is currently playing.

View 2 Replies

Add Some Sort Of EventListener To SoundChannel?

Jun 30, 2009

I am trying to build a simple player inside my swf file. The code is a bit messy but it seems to work.I´m using a soundChannel for Playback..I´m trying to figure out how to have the player play the next song once the previous one has reached its end.Do I add some sort of EventListener to the soundChannel?[code]...

View 7 Replies

ActionScript 3.0 :: SoundChannel And SoundMixer?

Sep 2, 2010

when do we use SoundChannel and SoundMixer?

View 3 Replies

IDE :: SoundChannel.SOUND_COMPLETE Won't Fire

Jan 12, 2009

i have a little flash-player with a playlist and so, it plays normally a vlc-mp3-stream but has an extended prelisten-function (wich plays the mp3's directly via http, secured with a password)i've got an array with 2 Sound()-objects (for preloading purposes), the code looks like this :

Code:
playStream = url=="";
if (playStream) {
SoundObjects[SN].load(new URLRequest("http://" + URL + ":8001/MIRstream.mp3?" + Math.random()), sloader);
} else {

[code]....

this works for the vlc stream (which is not continuos), but not for the mp3s on the http-server in my opinion, this doesn't makes sense..except, maybe the recent CSRF-hardcore-paranoia [URL]

PS: i use AS3 with flex_sdk_3.2.0.3794 and flashdevelop (i activated flash10-support, but it still works in fp9)

View 1 Replies

ActionScript 3.0 :: SoundChannel In Class Only Plays Once

Dec 27, 2010

The soundChannel only plays once.Im guessing this has to do with using a class?[code]...

View 5 Replies

ActionScript 3.0 :: SoundChannel + AddEventListener Gets 1009?

Jul 9, 2009

I'm having some problems with a script.I developed the app on a mac. It's intended to be both on mac and windows and also air and swf (I save data or not depending if it's installed or not).I've tested it on mac and several pc (winXP) but on win 2003 server and win 2008 server I get an error. Also on a winXP without flash player installed (through the projector) breaks at the same point.The problem is on the red line. It does always work right, sound loads, plays and when it finishes the event is called (in this case it loops). In other cases when sound completes the event should load a screen or so but, as I get an 'Error #1009: Cannot access a property or method of a null object reference' so the movie stops.I need all sounds to be inside flash so I put them in library and set their classes as com.escacs.sound.* (there are many sounds) I can't understand how mainSC can be null or undefined if the previous instruction initializes it.
 
[code]...

View 8 Replies

ActionScript 1/2 :: Adjusting Volume With SoundChannel?

Sep 3, 2007

AS2 -> AS3 migration: doncha just love it?!have a look at the attached code. selection one makes us anew sound and gets it playting, great. then we need to adjust thevolume so we read in the files that:You can alter the volume and panning while a sound is playingby setting the pan or volume properties of a SoundTransform objectand then applying that object as the soundTransform property of aSoundChannel object.great, so selection 2 in code below should do that, right?

View 7 Replies

ActionScript 3.0 :: SoundChannel Null When No Speakers?

Sep 29, 2011

I was debugging sound in an app and decided to make a little test case as I kept getting odd errors... well I just moved to a new desk yesterday so hadn't hooked up speakers yet. Here's the test:
 
var backSound:Sound = new bgSound();
var backChannel:SoundChannel = backSound.play(0, 999);
trace(backChannel);
 
bgSound is just a library sound... if my speakers are unplugged from the sound card backChannel returns null. If speakers a plugged in backChannel is a soundChannel object.

View 1 Replies

Modify Application To Use The Soundchannel Object?

Oct 23, 2009

so I have a lot of classes in actionscript 2. But I need to modify my application to use the soundchannel object for audio monitoring. as far as i know this is only in actionscript 3. so it it possible to write one class in AS3 and leave the rest in AS2?

if not is there a conversion tool which can make the process easier?

View 2 Replies

ActionScript 3.0 :: Attach SoundChannel(s) To NetStream

Jan 15, 2012

I have a Flex(4.6.0) application which creates 3 SoundChannels. I'd like to attach 2 of these channels to a NetStream for publishing, leaving the 3rd SoundChannel only for listening to locally.

The only audio component I can seem to attach to a NetStream is a Microphone, so I could use a Microphone loopback adapter and send ALL sound to the stream, but this would include all channels, windows sounds, sounds from other applications etc.

How do I attach individual soundchannels to a stream, or should I be going about this in a different way?

View 1 Replies

ActionScript 3.0 :: Find 'name' Of A SoundChannel Variable

Jan 30, 2012

I'm creating a mute/unmute button.I have it working correctly, except 1 part.I want to make my SoundChannels remove themselves when the SOUND_COMPLETE Event is fired.I'm storing my Sounds and SoundChannels in an array called "soundsPlayingArray".I want to do 1 of 2 things.Either:

1) Have my "unMuteAll" function check to see whether a song is "playing" before unmuting it.

2) Remove the Sound + SoundChannel from array (and make them null) when the SOUND_COMPLETE Event fires.

How can I figure out what the instance name of the SoundChannel that dispatched the SOUND_COMPLETE event is?[code]

View 1 Replies

Actionscript 3.0 :: Changing Volume With SoundChannel

Jun 1, 2009

Code: Select allprivate var musicFadeAmount:Number = 0.005; // Amount to fade the music
// Helper function to change volume
private function SetVolume(vol:Number, sc:SoundChannel):void


[Code].....

I run the last two rows in an ENTER_FRAME loop, and from the trace in the SetVolume() function I can see that scMusicIdle changes it's volume like it's supposed to, but scMusic keeps it's volume. I can change the volume when I play the sound with a new SoundTransform().

how to fade between two tracks in a better way I'm all ears. If it makes any difference it's an AIR 1.5 app.

View 1 Replies

ActionScript 3.0 :: Converting Into Strings Into SoundChannel Instance?

Oct 30, 2009

I am trying to call a method that pulls several variables depending upon the button clicked.Depending upon the button, it will play a certain sound/song. Below is what i have so far, if anyone could figure out why i get the following error: TypeError: Error #1034: Type Coercion failed: cannot convert "test_Btn12_soundChnl" to flash.media.SoundChannel."test_Btn12" is the button that i happened to click on at that time.

Code:
public function buttonClick(e:MouseEvent):void {
playSound(MovieClip(e.currentTarget), SoundChannel(String(e.currentTarget.name) +

[code].....

View 3 Replies

ActionScript 3.0 :: SoundChannel Event.sound_complete Not Working?

Mar 4, 2010

For some reasons, my soundchannel event.sound_complete is not working. Basically, my class is to import sound into it and to allow use to change their volumes and the speedness of the sound.
 
This is the tutorial for the speed [URL]
 
Right now, what I want to do is to auto loop back the song once the song have finished play but I have having troubled doing it.

[Code]....

View 5 Replies

ActionScript 3.0 :: Sound Object Or SoundChannel For Various Sounds?

Apr 10, 2010

As I have commented before I am building English teaching apps. I will have music playing in the background, words being pronounced and at times a surprise sentence. All three could sound at the same time at any given point. To build this properly should I use SoundChannel for all of these? 
 
At the moment my code for the music loop is as so. The sound is in the library and exported for AS. Is this code fine or is it better to assign it to the SoundChannel class.

View 1 Replies

ActionScript 3.0 :: Play An Instance Of A Sound In A Soundchannel

May 3, 2011

I have some sounds in my library that I want to play in a soundchannel, but how? This is what I have so far:

var music:Sound = new Sound();var channel:SoundChannel = new SoundChannel();var sTransform:SoundTransform = new SoundTransform();var sound:SoundFile1 = new SoundFile1();  // Note: SoundFile1 is a class; in it is my soundfile in the library// music.load(sound); ??channel = music.play();

View 1 Replies

ActionScript 3.0 :: Soundchannel To Be Empty And To Listen For The Sequencer?

Feb 23, 2012

its for a music sequencer im working on. the class needs an mp3 loaded into the soundchannel to work.I want the soundchannel to be empty and to listen for the sequencer,The visualisation reacts to the sequencer but only when an mp3 is loaded, I just want it to react without an mp3 loaded...

View 3 Replies

AS3 :: Flash - SoundChannel, RemoveEventHandler - Use The Sound Channel?

Apr 5, 2010

Is there a better way to use the sound channel is AS3?

var mySound:Sound = new Sound();
playButton.addEventListener (MouseEvent.CLICK, myPlayButtonHandler);
var myChannel:SoundChannel = new SoundChannel();
function myPlayButtonHandler (e:MouseEvent):void {

[code]....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved