Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




A Time To Tell Length Of Song Help



hey guys..

i have a sound.swf that has the whole song in mp3 in it.. i use stream..

i buffer about 20% then begain play..

is there a way that i can add like a time.. to show the pple how long the song is? ...

a timer count up or down is cool...

i already have a graphic bar..but i prefer the time thingy...

any tip?



Ultrashock Forums > Flash > ActionScript
Posted on: 2002-07-28


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Length Of Song?
How to get the length of a song?

Streaming Mp3 Song Length?
Hey friends,
I am making a MP3 Player for my website, and while I am loading streaming songs and playing them, it is not showing the total length of the song, but after the song loads completely then it displays the length....

Now, I want to know that if there is any way to get the duration of the streaming song while it is loading.

Any help would be highly appreciated.

Thanks

Is It Possible To Play A Different Song Every Time A Page Loads?
Is it possible to play a different song for each visitor to a web site? If so, how?

Thanks in advance.
Summarah

[F8] Audioplayer, Different Song Each Time Page Loads
Hi there

Im new here!

Could somebody please tell me or point me in the direction of a turorial for doing an audio player that plays a different song each time the page loads as at:
http://www2.georgemichael.com/

Im using Flash 8

With thanks

Stuey
x

3 Mp3s... 3 Bottons... I Need One Song Playing At One Time
Okay... i have 3 songs and 3 bottons

I need to be able to click button one and play song one... and stop all the other songs

then if i click button 2 i need song 2 to play... and stop playing song 1 and 3 ect ect

How do i do this?

Karaoke With Flash? How Do You Time A Song With The Lyrics?
Has anyone ever tried to make a radio that would spout out lyrics as the song played like a karaoke player? If so, please help because I would like to make a flah piece that would play a song and spout out lyrics simultaneously exactly like karaoke.

My main concern is on how to time the lyrics with the song. Is there a way to place the MP3 (which I will be using) in the timeline and span a certain number of frames so that I know when I can trigger the lyrics?

I really did search on the forum (this didn't help me) and none seems to help or relate to what I want, so thanks for looking even if you don't give any suggestion.

Karaoke With Flash? How Do You Time A Song With The Lyrics?
Has anyone ever tried to make a radio that would spout out lyrics as the song played like a karaoke player? If so, please help because I would like to make a flah piece that would play a song and spout out lyrics simultaneously exactly like karaoke.

My main concern is on how to time the lyrics with the song. Is there a way to place the MP3 (which I will be using) in the timeline and span a certain number of frames so that I know when I can trigger the lyrics?

I really did search on the forum (this didn't help me) and none seems to help or relate to what I want, so thanks for looking even if you don't give any suggestion.

Getting Mp3 Time Length
I need to be able to get the length of an MP3 and use that Var in a scrubber calculation.

So far all of my tests with Sound.duration do not give the total length of the mp3 until the file has completely loaded. I need to have the full file length as soon as the file has begun loading. Also I cannot rely on ID3 meta data for this.

How do I do this?

Thanks

Length Of Loading Time
So I have my site all set so that it runs from one interface with a movie clip layer that loads all the external content. The problem I'm having is the load time when switching from one content aspect to another. Is there a way to limit this? Can I add a little icon that will display until the clip is completely loaded? If the second one, how? Thanks.

Music Interface - Make Sure 1 Song Can Play At A Time, Coding Suggestions ?
I have been wondering about this for quite some time now, anyone have any suggestions for this ? And aswell, I havent really made any music interfaces yet, any links to tutorials to make them would be greatly appreaciated, thnx !

Movie Length Based On Time, Not Frames
Hello all,
I was wondering if anyone knows how I can have a movie hang on a frame for a specified amount of time(in seconds, preferably) before moving to the next frame. Any suggestions?

Mark

[AS2] Disable Buttons For A Length Of Time, Then Enable Them Again.
Hi

I'm using this script to go between sections with a fade out before loading the next section...


Code:
stop();
menuButton1.onRelease = function() {
loadPage("content/plan.swf");
};
menuButton2.onRelease = function() {
loadPage("content/build.swf");
};
menuButton3.onRelease = function() {
loadPage("content/images.swf");
};

function loadPage(pageName) {
movContainer.gotoAndPlay("out");

this.onEnterFrame = function() {
if (movContainer._currentframe == movContainer._totalframes) {
delete this.onEnterFrame;
movContainer.loadMovie(pageName);
}
};
}
... which works great, playing the "out" fade-out before loading the next section, but if for example the fade-out takes 8secs, if someone presses one of the other buttons before its got to the end, it plays from the "out" label again. So if someone gets inpatient and just starts clicking away they will just keep looping the fade-out and nothing will load.

Is there a way to disable the buttons after pressing for long enough for the fade-out, but then become active again? If its something that could work with my existing code that would be great.

Thanks
Wayne

Scripted Movement Over Time Period/frame Length
i'm using this as to move an mc across the screen on the x coordinate:

code:
onClipEvent (load) {
//set initial x pos of clip
this._x = 0;
}

onClipEvent(enterFrame){
//this moves our clip 1 pixel to the right every frame
//up to a certain point
if (this._x<300)
{
this._x+=1;
}
}


I need to adjust this so that the movement takes place over an alotted time period or a defined frame length. Any ideas?

Embedded Video:Display Total Length & Running Time.
Hi
I have a 26 seconds long video embedded in a flash movie.
Id like to display the total length and running time in a timer.
Is this possible?
What should I do?

Stuck at work
Thanks
Leo

I Need A Button That Will Change The Song Depending On What Number Song Is Playing
alright i need a last button that will change the song that is playing.

if 5 is playing then change to 4 if 4 is playing than change to 3 the some for the next button.

if you can help than please post thank you

I Want To Play My Song..when I Click The Song Button.....
After playing an animation a song starts and i have a button where if i click, another song starts playing and previous one stops like that i want several songs to be played by clicking the desired button for that particular song.....someone gave me following action script but i think it works in flash MX only But i m Using Flash 5....and i want it in flash5..is there anyone who can help me....pleeeeeze..!

ss = new sound();
function loadnewsound (newone){
ss.loadsound(newone,false);
ss.start();
}
loadnewsound("track1.mp3);

//then on the button i have put
on (release){
loadnewsound("track2.mp3");


pleeze help!!!!

Play Song And Show Scrolling Song Name
Here's the scenario, I want to a have song be loading when the page loads. I want there to be a start and stop button and i want a change song button (the song that plays next could be random or in a certain order i dont care). I also want a movie clip im guessing that shows the song title (Mabey an empty symbol thing?) of each song. I would like the song title to scroll contiuously if thats at all possible but if not its no problem.
~Thanks

Getting To Next Song After Song Ends (flash 8)
hi!
Im using flash 8.

Is there any way i can get my script to go to next keyframe when the song on the current keyframe ends? (the song is locatet inside 1 mc, so i guess that the nextframe code is going to be with some kinda "_root" in front?)

Thanks, Andy

Trying To Import A Song For A Background Song
I need some help im making a website using flash 8 and im trying to import a song for a background song but flash wont let me its telling me that it cant do it

Video Length Does Not Match Music Length
I want to have a 3 minute wav file loop infinitely over a 20 second flash video which also loops infinitely. The only way I have found to do this is to copy and paste the video so it repeats itself for 3 minutes, then the whole thing loops. Is there a way to run my 3 minute wav file in the background of my 20 second video conveniently?

Here is an example of what I have already made:
http://www.limdallion.com/Characters/Pyk/Pyk.shtml

Mp3 Sound Length And Played Length
hey i have an mp3 players, is a lot of code so im not going to post it all at.
but what i want is something to tell me the length of the sound and the current playing time..

well i will post this much of the code that i made i just don't know how to turn it into minutes and seconds.


Code:
private function onEnterFrame(event:Event):void
{
// this is the total estimated time
estimatedTotal = Math.ceil(snd.length / (snd.bytesLoaded / snd.bytesTotal));

// this is how much the sound played in %
position = Math.round(100 * (sc.position / e));
// i was just testing with aprogress bar
run.setProgress(p, 100);
}
so how i turned this code that works into minutes and seconds.

Mp3 Length Don't Match Timeline Length
I got myself a simple setup - an animation playing against an audio track. I've used 'use imported mp3 quality' in the export dialogue box. I've got a root timeline of 814 frames long. At 25 fps this gives me a timeline length of 32.5 seconds - this should be the same length as the mp3.

however the mp3 finishes about 5 seconds before the timeline?

How are you meant to sync audio to animation if there is that much discrepency? I haven't got anything processor intensive on the timeline.

Difference Bw Array.length() & Array.length
Hello

I have a question about AS3 array length method. sometimes if you use array.length() it gives error while other times it works fine and same is the case with array.length can anyone explain the difference please?

The Whole Song
Hello Everybody!
How can I play a complete song during a movie of 6 scenes?

Thanks!!!!!!!!!

Song
Sorry I'm still new at flash i want to make a music video. how do i get the song (mp3 file) in. And where ddo i go from there to play it and stuff. Thanks/

After Song Is Done...
What do I type in the action script if I the movie to go to a certain frame(or continue to the next one) once the song is done?(Is it even possible?)

Song
i have a 5 minute song i want in a game but i dont know how to put it in, i have a wav and MP3. plz tell me how! kthx!

Song Help
Im having trouble importing a song into flash to use on my website, it tells me it wasent important because there was trouble readin them. any help?

Lot's Mp3 Song
Ok it's simple I have 10 mp3 files and each one has his own play and stop .
the problem is when I play one song and then the other one they are both playing ( I solved this.)
And if I click more time same play btn they start playing on top of each other (also solved this).
If I put this code for one mp3 it doesn't want to play second time
code :
on (press){
if(playing!=true){
sound = new Sound();
sound.attachSound("galebovi");
sound.start(0,999);
playing=true;
}

}
what is the problem
tnx for help

Loading A Song Into An Swf .
Ok here is my question ..... i need to load a song into an swf . How would i go about doing this ??? Also when i load the song i need to load it into a varible so i can use volume and balance controll . How would i go about doing this ??? also would the song have to be a swf ??? thanks for your time .

Playing A Song
Hello,

What I'm trying to do: have a full length song play on my website.

I know how to import the mp3 file and insert it on the stage, my questions are,

How can I add a stop and play button for it? This is done with action script? I know a little bit about action script, so adding this play/stop button, is it easy to figure out?

Also is there a better sound file I should use to import a song into flash? Are MP3 ideal? or is there another type of file I should use to make it load faster?

Any suggestions that would help are appreciated.

Thanks,
C

Fade 1 Song Out And Fade In New Song?
Can Anyone direct me as how to do this?

http://www.kennybellew.com

goes over fading out and in...but not for 2 songs.

I could use his code and write a function passing the song I want to fade out and then re-run a function that passes the second song to fade in...not sure how to do this with javascript in Flash.

Thanks,
Andrea

Song Button
i want to make a song button for a website, but the song filesize is 2.7mb, if i streamed the audio would that make less loading time, and how do i stream audio

Song Through Out Movie
Hey, to anyone who reads this and helps me out.
So I have a movie (with various scenes) and I have to make this song play out through the whole movie... how would I do that? make another scene and call it out throught the other scenes? Thanks,

Odd - Loop Song
I have a song looped within a movieclip (MC_1) that is enabled by an actionscript:

LoopSong = new Sound();
LoopSong.attachSound("Twilight Piano");
LoopSong.start(0, 99999); //0 offset with 99999 loops

When tested it works fine, also when I export the file as a MC_1.swf and double click it, everything works.

The odd thing is when I run the index file (Main.swf) that has a button link to call MC_1.swf, the movie plays but the loop song will not start. I can't figure out why.. I made sure all variables were unique, anyone have any idea?

thanks

Play A Song Again
I'm creating sound in the background of something and I want it to be controllable. I can stop the sound with the stop button, but I can't get it to play again with the play button. I gave the sound an instance name to try using the script

on (release) {
clarity.start()
}


that doesn't work though. What can I do to play the sound? The sound is in one of my layers. thanks

maria-

Need Song Put To Video.
I have a song I need put to a flash video. The video would need to look something like the videos that play on the windows media player with our website name and one or two skulls popping up from time to time. Let me know how much this would cost and please show me some work that you have done like this.

Song Titles
Hey,

I have a simple music player that plays external .mp3 files.

I am trying to display the songs names for each song. I have 5 different songs, I want to make it so when the user clicks the "next song" button, I want the name of the 2nd song to appear, and if the user clicks the "next song" button again, I would like the title for the 3rd song to appear and so on.

I am not really sure on how to accomplish this. Maybe with variable names?

Thanks,
Baljinder

Background Song
I've made a website in flash with 5 scenes and I would like to know if I can make a song to keep playing even if I walk between the scenes?? thx in advance

I Have A Song That I Want To Use , But Its Volume Is Very Low , How Can I Get It....
i have a song that i want to use for my flash site , but the volume of the song is a little low , is there a way i can make the volume higher? the original song is low volume , so i belive i need a way a way to make the volume higher using a different program . so any u guyz know any programs that can do that or something? thanX

Song Change
hey i was just wondering if someone could tell me how to change the songs on this player:

click here

Song Problems
When I try to import this one song, it does not work. a pop up comes up and it says "having problems reading the file" something like that. but when i try a different song, it works but not this one. the song is the theme song from SAW.

End Tween At End Of Song
hey does any one know if there is a way to end a tween at then end of a song loaded from then internet?

if there is a way to load the length of the song in frames as a varible then im sure i could figure out a way to end a tween on it...

thanks a bunch for any help
-yeps

Getting Title Of Song
hey every body... i was wonderdering how to get the title of a song... ive done this before but i cant seem to rember how

does any body think they can help me out?

Random Song
I want a little flash doc to load a random mp3 from a website and play it. so, i need to get a random number, and use it to select a url...

I = random number
if I = 1 then URL = "song1.mp3"
if I = 2 then URL = "song2.mp3"
if I = 3 then URL = "song3.mp3"
if I = 4 then URL = "song4.mp3"
*play URL*

but i dont know how to code this.

Song In Movie
I am putting a song loop in my movie. As the song plays I want it to get faster and faster. Is there a way to do this with a short loop?

Song Position
I'm making a small simple music player. But I have a problem I can't figure out. When some one changes the position of the progress how do you change the position of the song. I've always seen the simple play and stop for mp3. But this seems more complex than that. Does anyone know how to do that?

Thanks!

The (really) Old Song Of Data To .txt
hmm, I have tha t realy simple AS2 code :


Code:
on (press) {
savbuff = new LoadVars();
lvfake = new LoadVars();
sav = _root.currfram;
savbuff.sav = sav;
savbuff.sendAndLoad("Save.txt", lvfake, "POST");
lvfake.onLoad = function(success:Boolean) {
if (success) {
trace("year! ");
}
};
}
...I want to save a number like 14 (stored in _root.currfram) in my save.txt (&sav=14 ), but I dont know how!
I already have done such many times with php, writing in db and others, but I dont want a server application, my swf runs on a single PC and I just want to store that damn f**g integer!!
anyone knows how to direktly write to .txt? without any php or other
(loading things works perfektly!...)
please any help!! thx

Song Not In Sync
This is getting frustrating

I have Flash CS3 (I don't know if that's similar to 9), and I'm currently trying to make an animation, which is supposed to be in sync with the song I put in. What I do is put the song on a layer and then do my animation, and then preview it right on the program; and it's fine this way. However, when I Test Movie (CTRL+Enter) and watch it on there, the song goes too fast and the animation can't keep up. What is wrong here?

My export settings for the audio stream and event are: MP3, 160 kbps, Best

I'd really appreciate any input. Thanks.

Copyright © 2005-08 www.BigResource.com, All rights reserved