ActionScript 2.0 :: Displaying Duration / Position Of A Sound Object

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


Similar Posts:


ActionScript 2.0 :: Uses Sound.position And Sound.duration To Use As A Playlist?

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

Professional :: Get The Full Duration Of A Sound Object?

May 5, 2010

I was wondering how I can get the full duration of a sound object.I know "sound.length" returns me the loaded length,but is there a way to get the full length so i don't have to wait until i loaded?

View 2 Replies

Flash :: Displaying Duration Of FLV With AS3

May 25, 2011

I am trying to show the duration of an FLV movie with AS3. I keep getting a Metadata error. Code below.

[Code]...

View 2 Replies

Get Duration Of A Streaming Sound?

Feb 18, 2010

I am trying to write an mp3 player. I have tried everything and am suck getting the duration of an mp3.[code]...

View 1 Replies

Flex :: Playing Sound For Certain Duration

Nov 25, 2009

I have a mp3 file and I would like to play it from one position and for a certain duration. I have first used the Sound class, the play method where I can specify the start but not the duration. I have looked then at SoundEffect class where you can specify a duration and a startTime. However I do not know how to play it from a AS3 class not from MXML : there is a play method ... but I get no sound!

View 2 Replies

ActionScript 3.0 :: Deterining Duration Of A Sound File?

Nov 27, 2009

1. Is there a method of determining the length of a sound file (mp3 primarily); in bytes, elapsed time, before the file is played? (the file could be played against a stop watch and the elapsed time record after the fact, programmatically).

2. Is it possible to set markers and fast forward/rewind to markers corresponding to the file?What I am thinking of is a feature allowing the user to play a file to a point and pause, set a marker, rewind and play to the marker and stop, or fast forward from the beginning and play from the marker, or even play past the marker and rewind to the marker.

Setting a marker would be the easy part: just record the elapsed time when the pause function is called.Getting the sound file to start playing from that point without the previous part played at normal speed;(with volume off) is the essential part of this question.

View 3 Replies

Actionscript 3.0 :: Get The Duration Of A Selected Sound File?

Jun 8, 2011

I'm really new about OOP AS3 programming, seems I can't fully understand how the eventcentral class works.For what I've understood this "system" allows classes to communicate between each other, passing parameters and call functions.So, having this ultra simple class:

Code: Select allpackage
{
import flash.events.*;[code].........

I'd like to execute (in the main class) the function "callthis" in the seconda class.

View 2 Replies

ActionScript 2.0 :: Online Sound Duration Incorrect

Nov 30, 2004

i have a mp3 player that works perfectly offline but once online the sound.duration seems to be incorrect. The sound.duration = 15' online and 52' offline. And it's the same for each mp3 with an incorrect duration. You can see what i mean here : [URL]

View 2 Replies

ActionScript 2.0 :: Can't Seem To Access The Sound Duration Value In Code

Mar 15, 2007

I can't seem to access the sound duration value in my code, I am not sure what I am doing wrong.

Code:
var directory:String = "Voices/";
var noOfSongs:Number = 100;
var aSongs:Array = [];
var currIndex:Number = 0;

[code]....

View 1 Replies

Actionscript 2.0 :: Access Sound Duration Outside Onload Function?

Jan 21, 2009

How to access the sound duration outside the onload function....im trying to diaply the duartion of each song in the playlist by loading them one after the other...but am not able to access duartion of all the mp3 files....i want to knw if there is any way to access the sound duration outside the sound.onload function.

View 3 Replies

ActionScript 2.0 :: AudioPlayer - Sound Duration Timer Display?

Nov 2, 2003

I'm building a simple audioplayer. In frame 1 I have:

Code:
mySound = new Sound();
songs = new Array("1.mp3", "2.mp3");
songIndex = 0;
mySound.loadSound(this.songs[songIndex], true);
mySound.start();
var playing = true;
[Code] .....

So, the sound begins to play from the beginning. However the problem is with the timer: when 'stop' is pressed it says 0:00. But, when I press play again it immediately jumps to the time it showed when stop was pushed, e.g. 0:12

View 14 Replies

Actionscript 3.0 :: Jsfl Panel & Flash Authoring - Get The Duration Of A Selected Sound File?

Jul 13, 2010

I've developed a neat WindowSWF panel after watching Lee's demonstration video. I got everything I needed to work, but I'm having trouble getting information from my sound files. Basically I have a list of sound objects (.wav format) in my library and I want to find the duration of each file so that I can add them to existing movie clips, then add or remove frames depending on the length of the sound file on the frame. I've been pouring over the jsfl actions libraries and can't find any method to get the duration of a selected sound file.

View 2 Replies

IDE :: Make The Duration Of A Movieclip Equal The Duration Of The Preloader?

Apr 3, 2009

is it possible to make the duration of a movieclip equal the duration of the preloader, i mean is it possible to make something like, the time the preloader needs to reach the 100% = the duration of the movieclip? i'm using AS 3.0 and flash CS4 just in case it helps here is my code for the loader:

Code:
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
function loadProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;

[code].....

View 1 Replies

C# :: Move Object From One Point To Another Based On Duration?

Jun 21, 2011

Basically if I have a sprite for example located at (10,10) I want to move it to say (50,100) and the whole process to take 2 seconds or whatever duration I specify. What is the exact math behind this? I was using a distance based solution to determine speed but was just using a random modifier to control the process. I need something more precise to execute exactly over a set duration.

View 4 Replies

ActionScript 2.0 :: [MX] Mp3 Sound Position / Sound Length?

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

ActionScript 2.0 :: Displaying A Movie Clip At Mouse Position?

Feb 18, 2007

Im learning actionscript using the tutorials here so im more interested in learning *how* rather than just getting it done.

Ive come across a problem on something ive been trying to do. Ive been trying to make a 10 framed movieclip appear at the mouse position and play continuously. To do this I have a two framed loop.

Here is my code. Circle_mc is the movie clip:
-----------------------------------------------------
//this is the name of my function and what it has in it.
CreateAtMouse = function () {
Circle_mc.duplicateMovieClip("circlecreate", 2, {_x: _root._xmouse, _y:

[Code]....

View 1 Replies

Flash :: Dynamically Create New Sound Objects Based On Raw WAV / DATA Or Other Sound Object?

Jan 31, 2012

Is there any AS3 library or code-snippet that can create altered versions of a Sound object on-the-fly (at runtime)? Either based on:

An existing Sound object; A ByteArray object;

For example, say you have a "dry" sound of a gun-shot. You could:

[Code]...

View 1 Replies

Actionscript 3 :: Sound.extract Method Empties Sound Object Data

May 20, 2011

I am using the following to extract the byte info from a sound object - however if I go back to the same sound object and run this again, The byteArray has no bytes available.

var data:ByteArray = new ByteArray;
sound.extract(data,sound.length*44.1);
data.position = 0;
return data;

Is this the correct behavior? Is there not a way to do this multiple times on the same sound object?

View 3 Replies

ActionScript 2.0 :: F8 - Attach Sound Object To A Separate Mc To Control Independently From All Other Sound / Root Volumes

Mar 15, 2008

I have been at this for about 19 hours straight! I am going to go to bed immediately after this post, but for crying out loud, I have NEVER had this problem before today! Before anyone reads ahead and says 'you have to attach your sound object to a completely separate mc to be able to control it independently from all other sound/root volumes.' see if the following code accomplishes just that:

[Code]...

View 2 Replies

Flash - Take Two Sound Objects And Combine Them Into One Sound Object

Nov 15, 2010

Is it possible to take two Sound objects and combine them into one Sound object so that one Sound plays, and then the second plays right after it? I can just play the first Sound and then the next right after it, but it would be much cleaner to combine them before playing the audio.

View 1 Replies

ActionScript 2.0 :: Streaming Sound Distorted - Sound Object?

Jun 14, 2004

I have a streaming sound that is loaded into my flash movie (will end up on CD) that is very distorted, it sounds like someone is slowing down the audio, the voice sounds deep and slow

View 1 Replies

ActionScript 3.0 :: Trace The Path Of An Object By Using SetPixel On The Object's Position Every Frame In A BitmapData/Bitmap Pairing?

Feb 16, 2011

I'm trying to trace the path of an object by using setPixel on the object's position every frame in a BitmapData/Bitmap pairing. These pixels aren't showing up normally and I suspect I have a fundamental misunderstanding of the BitmapData class. Here's what I'm doing:

public var contrailBase:BitmapData;
public var contrail:Bitmap;
private var contrailColor:uint;[code].....

Using this code, the red pixels don't show up. If I initialize contrailBase to 0xFF000000 instead then I get a black screen on which the red pixels DO draw, but I need the bitmap to be transparent except for the contrail. What am I doing wrong?

View 2 Replies

ActionScript 2.0 :: Can't Get The Sound.position To Reset To 0?

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

ActionScript 2.0 :: Sound.position Not Resetting

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

ActionScript 2.0 :: Clearing Sound Position Value

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

Oop :: Manually Setting Object's Position Or Have The Object Do It All?

Jun 11, 2010

I'm stuck thinking about the best way to go about setting a line segment's position, I have a class Line(length, angle, previous) being called from a class Polygon. Right now I have:

public class Line extends Sprite {
public function Line(length:Number, angle:Number, previous:Line = null) {
if (previous != null) {
this.x = previous.end.x;

[Code].....

View 1 Replies

ActionScript 3.0 :: Sound Volume By Position Mouse?

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

ActionScript 2.0 :: [CS3] Playing Sound Based On Mouse Position?

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

ActionScript 3.0 :: Controlling Sound Of Movie With Mouse Position?

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







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