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


Similar Posts:


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

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

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

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

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 :: Create A Simple Sound Playlist At Runtime?

Dec 15, 2011

This is what I try to do: I am creating a game with spoken sentences. These sentences are loaded dynamically from an XML file, which contains the paths to mp3-files.This is what is currently happening: All sentences are spoken at the same time.I want them to be spoken one after another - how to I obtain this requirement?This is my (simplified) code example:

import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);

[code].....

View 3 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

Actionscript 3 :: Sound Latency - Set It For Any Silence Before The Actual Sound By Calling The Sound

Apr 16, 2011

I am triggering short sounds dynamically from the library for a game (Specifically Air for Android). When the user clicks a button the sound can take up to 600ms to actually play. I have set it for any silence before the actual sound by calling the sound like so:

[Code]...

All return the same results. I know there are threads here that talk about this but none have offered a real solution that I can find. Is there no way to cache the sound or store it in a buffer?

View 1 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

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

ActionScript 3.0 :: Sound Position And Length On Slider Component?

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

ActionScript 2.0 :: Load Mp3's So The Sound.position Property Resets?

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

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

ActionScript 2.0 :: Store Playing Sound Position In A SharedObject?

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

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

Loading With Sound Only Played Once But Keeping Hover Over Menu Item Sound Intack?

May 21, 2010

I have a flash header that was never completed because the guy I hired took people's money and ran. So now I even wonder if what he said could work with my flash header is true or not. But, usually there is always a way to make it work.

I have a flash header that does two important things: 1) Upon entering the site, it loads and plays an audio track 2) Makes an animal noise when you hover over each animal menu item. (not sure if I'm able to give a link to it or not on here. If I able to and someone would like to see it let me know)

I want to know if my flash header can support the following additional functionality/changes:

1) Currently, it loads everytime a page is selected. I only want it to load the one time of entering the site because the audio gets annoying. Set a cookie maybe?

2) But, I do not want to turn the audio off completely because I still want the hover over each menu item sound.

3) Have a link on it to allow them to select to turn on / off the sound completely. It currently has that, but only for the current page. Once you select another page, the audio is back to on.

4) Lastlly, is there a way for it to detect that someone doesn't support flash and to display an html version of it? And can flash create a html version from my fla file?

I don't know much about flash (but am learning) so I'm not sure if I'll be able to do this myself. However, I want to find out if my flash header will even work this way before I invest the time learning it just for these changes. I know it will be pretty deep with script code, but I'm hoping I could find base code already available for these features. Not sure I can afford help now because of being laid off and two different scammers taking advantage of me. So I'm going to try to do myself and see if there is any suggestions/support on here that can help. I have Flash CS4.

View 2 Replies

ActionScript 1/2 :: Make Button On Rollover Starts Sound And Rolloff Stops Sound?

Jul 28, 2009

I have several buttons in a movie and I want to be able to rollover an individual button and play the sound for that button and when I rolloff I want the sound for that button to stop.

View 6 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







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