ActionScript 3.0 :: Getting The Remaining Time Of A Song?
Apr 23, 2009how to get the current remaining time of a song and update that every second so I can display it on a textfield
View 3 Replieshow to get the current remaining time of a song and update that every second so I can display it on a textfield
View 3 RepliesI'm trying to figure out how to get the time remaining of an flv.
I currently can get the total time and the current time.
Code:
var totalHours:Number;
var totalMinutes:Number;
var totalSeconds:Number;
[Code].....
I have looked at the Timer Class documentation and there does not seem the Timer Class provides a method or variable that returns the remaining time. I was wondering if there is a way to determine how much time is remaining after a timer has been started?
View 3 RepliesI've been toying around with this RepublicOfCode tutorial and changed a few things here and there.For example, I wanted a play/pause button in stead of seperate buttons. And I wanted a stop button so people can actually stop the music.Now here lies the problem, play/pause works BUT after I've stopped the music, the music will start again with the play button but it wont pause, it will just start the song again and again and again... On a side note, I wanna try to add a volume slider, seek bar, time remaining, and possible (if i can figure it out, probably also has to do with the XML) a playlist.[code]
View 5 RepliesI'm makking a simple flash player which loads movies as the songs.The song file is simply a preloader then in the next scene one frame which plays the song.I would like to know how I can have a display which shows the song time.
View 1 RepliesI have developed a Player where I am using FMS to play MP3 files, it works great in normal scenario but when user keep on clicking new songs from Song List (List Component) then the player stated playing all songs. Which It should not do. Is there a way that we can unload previous song before loading new song.
View 5 RepliesI have a list of mp3-songs, when song 1 is clicked it gets streamed, a stop-button appears, if this Btn is clicked, this Btn disappears as it should - but if user forgets to click for stopping sound and clicks song 2, stopBtn 1 remains and the new stopBtn 2 also appears. there should be only one stopBtn, the one next to the song is playing.
I would like to move the stopBtn and I have tried several approaches move; graphics.moveTo; if(stopButton !=null) {removeChild (stopButton)}; I packed the var stopButton:Sprite in the header and so on.
Code:
SoundMixer.stopAll();
import flash.display.Sprite;[code]..........
I am writing a mp3 player and having some issue getting the song length before the entire song has been loaded - which messes with my position indicator, as it needs to know the track length. I thought I could get the length from an ID3 tag, problem is ID3.TLEN returns undefined, though if I right click the track and show properties, the summary tab shows song duration, bitrate, etc... how I can retrieve the song length before the entire thing has been downloaded?
View 4 RepliesI have a site up that is a "music" site, it is XML and flash and I would like to know if it would be possible to and how would I enable the page so that it shuffles the songs and plays a random song every time the page is loaded.URL...
View 2 RepliesI'am making a advanced mp3 player arund this tutorial: [URL] and i want the users of the player to see how long they have listen or how long time back of the song. i have the AS i what to use but i cant connect them. becuase the tutorial i used does not make a sound objekt (MUSIC)
[COde]...
I'm trying to make a few movieclips grow when you rollover them and the shrink back down when you rollout. I tried using swapDepth to make it so each clip would stay on top. But then when I try to instruct its root movie clip to go back to frame 1 (which is blank with a stop command), it remains on the stage. Here's the code for the movie clip to grow/shrink/swapDepths
[Code]...
I am using a preloader in my movie. Say when 60% of the movie gets loaded, Is it possible to play the initial 60% while downloading the remaining 40% of the movie in the background.
View 2 RepliesI have two timers. The first once counts down from 10000 milliseconds and stop as soon as the user clicks a button. Then the second one counts down the same until the user clicks again.
[code]...
What I want to do is take the remaining milliseconds from both timers and add them together to get a total.
[code]...
Say both timers ran for 3000 milliseconds, then that would remain 7000 milliseconds left and then both added together would give me a number of 14000. But when I trace the variable of the two timers added together, totalTime, all that I get returned is [object Timer].Does anyone know how I can convert the remaining milliseconds of my timers in to Number or somewhat so I can add them together and basically do maths on them and output the results.
I have the following algorithm:
if(textfield has no space left / full of characters till width) do something else keep adding characters
Now, the issue is I don't want the text field to be limited to X number of characters, but the actual width of the characters.
Is it possible to remain an on going animation on a child MC while moving the MC to the stage (same level as its parents)
If by using removeChild and addChild again the animation will not be consistancy.
I have created 5 movieclip buttons and added them on the stage. How can I disable the button that is clicked and enable the remaining and so on..?
View 8 RepliesMy html has 3 parts which I want to appear vertically in the page: header swf footerThe header is 100px high and 100% of width. The footer is 25px high and 100% of width.
I want my swf to take up the remaining vertical space on the page while maintaining its aspect ration of 4:3. I'd also like automatic redistribution of space to occur whenever the page is resized.
I have attempted to put the swf into the page using dreamweaver's built in methodolgy cs4's method when creating a corresponding html page swfobject 2My swf ends up with the dimensions of the page (without regard to the header and footer). The result usually involves the other content being off screen and unwanted vertical scrollbars. Often, regardless of my choice of showall or exactfit, i get distorted aspect ratio.
Is there an approved or standard way to achieve automatic resizing of a swf based on the remaining available unused height in a page?
How to calculate(using actionscript) the space remaining in that line of textbox where the text is word wrapped?
View 7 RepliesI am trying to pull a link (or links) out of a text string. So if I had something like this:[code]I would like to be able to find the links in the text string and replace them with a single word or words that I would format to be an HTML link within a text box.I've had some luck with string.indexOf, but I'm not sure how to detect the end of the link where the remaining text begins that I don't want linked.
View 7 RepliesI need a small help on Flex Line Chart. I am using FlashBuilder 4 and doing a simple application in flex. I am displaying a graph with 10 random values and based on the values i am trying to change the itemrenderer values like CandlestickItemRenderer and BoxItemRenderer. Now my requirement was, if the values are > 10 i want to show my chart with CandlestickItemRenderer else i want to show the remaining spots as BoxItemRenderer. I am failing to do this. Either i am getting all the shapes as BoxItemRenderer or CandlestickItemRenderer. i am sending the code as a text file along with this.
View 4 RepliesI have an array of say, food products. The array is full and fully visible at first. I have a filtering system, by which I can eliminate, one at a time, a certain category. So let's say that I disable the "fruits" category. The fruits disappear and I'm left with "holes" in the array. Up to this point it's all good, I can handle it. The problem is that now I want to close these "holes" by moving the remaining items around. And I have no idea how to calculate/formulate the logic of this movement.
View 4 RepliesI am developing an online listen music website, on that I want to play song based on the user selection from gridview.right now I am using flash object for playing mp3 and video file this is running fine but its static path.how I can dynamically pass file URL of selected song on flash object.
View 3 RepliesIn the animation im making i have multiple scenes in it and i was wondering how i could have 1 song play throughout the whole animation?
View 2 Repliesi want to play a mp3 song when i click on button song play and when i click on stop song will be stop.
View 5 RepliesI have an mp3 file that i dragged into a layer, which starts playing at the beginning of my movie.if i preview, i can hear it playing.
annoying problem is that if i stop or pause the preview, the music keeps playing and if i start it again, another instance of the audio track starts playing again so that they are playing at the same time.
Where I can find song without words?
View 2 Repliesso I have this mp3 player I made. It won't go to the next song when a song ends sometimes. It will if the song is very short (10ish seconds) but once it gets to the 30 second mark it won't go.If you click on the slider at any point it will get to the next song, if you click the pause play button it will get to the next song.I have only been doing AS3 for a little bit and I am totally baffled by this problem.
I've attached the code as a .txt file, i sorted them into their sepperate files with a header. I hope its ok to read. I can post them differently or post the actual player need be.
find out the bit rate of a playing song using As2 or 3.
View 1 RepliesI have an mp3 on my little site, but when It is supposed to load, instead of the percentage number, its just says NaN.
Code:
AudioXml = new XML();
AudioXml.ignoreWhite = true;
AudioXml.onLoad = LoadXmlFile;
AudioXml.load(playListPath);
function LoadXmlFile(success) {
[Code] .....
I'm trying to make an MP3 player with art and text associated with each of the 4 songs I need included, but I can't figure out how to load more than one song into the player. The first song loads and plays fine, but when I try to load another one of the songs, I'm given this error:
Code:
Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.
at flash.media::Sound/_load()
at flash.media::Sound/load()
at RealSite_fla::mp3player_mc_6/goGS86()
And here is my code:
var req:URLRequest;
var sound:Sound = new Sound();
var controller:SoundChannel;
var volumeControl:SoundTransform;
var soundPaused:Boolean = false;
var position:int;
function loadSound(event:Event):void
[Code] .....