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




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.



ActionScript.org Forums > Flash General Questions > Flash 9 General Questions
Posted on: 11-05-2007, 02:06 AM


View Complete Forum Thread with Replies

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

[F8] Sync A Song That Has Been Loaded Into Flash
Hi!

I'm making a music game, and I might as well just tell you directly that it is for the rock out-contest held by armor games. I have almost completed the coding part of the game and it works like a charm, synced and all.
However, I'm now exploring the possibilities to make a song editor. I think I've got most of it figured out; you can load a song into the flash and then you just specify when you want the 'notes' to come. You will get the option to save the song and also a code that you can give your friends so that they can play it as well. I only have one thing I don't know how to solve at the moment, and that is the sync of the uploaded song. I have put the preset songs into mc's and set them to stream, once the game starts the mc plays. Is there any way of achieving this with code, or does anybody know of another way?

Thanks in advance!

Sync A Song That Has Been Loaded Into Flash?
Hi!

I'm making a music game, and I might as well just tell you directly that it is for the rock out-contest held by armor games. I have almost completed the coding part of the game and it works like a charm, synced and all.
However, I'm now exploring the possibilities to make a song editor. I think I've got most of it figured out; you can load a song into the flash and then you just specify when you want the 'notes' to come. You will get the option to save the song and also a code that you can give your friends so that they can play it as well. I only have one thing I don't know how to solve at the moment, and that is the sync of the uploaded song. I have put the preset songs into mc's and set them to stream, once the game starts the mc plays. Is there any way of achieving this with code, or does anybody know of another way?

Thanks in advance!

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

EITHER: Volume Control On Sync Streaming Problem OR Loading External MP3 Not In Sync
Hi - I'm having a bit of a nightmare at the moment and would if you could pass any advice on the following, as I have been stuck on this for sometime.

As part of a menu screen, I have a background movie which involves a series of animations etc. This movie plays in sync with the music. This all works fine and is quite effective.

However, it has come to my attention that some of the users sometimes wanted to adjust the volume or mute it altogether. I have done many examples of this before previously, but became stuck when I realised for the music, all I did was import the MP3, and then dragged it right onto the timeline. From this, there is no variable/instance/linkage created to control the volume using setVolume. I tried to give a linkage name but was not affecting the main sync streamed music on the timeline.

SO following this, I decided at the beginning of the preloader to load the MP3 externally and play it as a stream, however this does not sync with the movie and falls out of time with it.

So all I need is a push to where I should go with this one.

All I want is for a MP3 to play in sync with the movie and I can adjust the volume of it also via actionscript during the movie.



- Is there a command I can use to sync the streaming external MP3?
- Can I adjust the volume of the initial sync stream via the timeline

Any ideas on this would be extremely helpful.

Thank you in advance.

Paul C.

EITHER: Volume Control On Sync Streaming Problem OR Loading External MP3 Not In Sync
Hi - I'm having a bit of a nightmare at the moment and would if you could pass any advice on the following, as I have been stuck on this for sometime.

As part of a menu screen, I have a background movie which involves a series of animations etc. This movie plays in sync with the music. This all works fine and is quite effective.

However, it has come to my attention that some of the users sometimes wanted to adjust the volume or mute it altogether. I have done many examples of this before previously, but became stuck when I realised for the music, all I did was import the MP3, and then dragged it right onto the timeline. From this, there is no variable/instance/linkage created to control the volume using setVolume. I tried to give a linkage name but was not affecting the main sync streamed music on the timeline.

SO following this, I decided at the beginning of the preloader to load the MP3 externally and play it as a stream, however this does not sync with the movie and falls out of time with it.

So all I need is a push to where I should go with this one.

All I want is for a MP3 to play in sync with the movie and I can adjust the volume of it also via actionscript during the movie.



- Is there a command I can use to sync the streaming external MP3?
- Can I adjust the volume of the initial sync stream via the timeline

Any ideas on this would be extremely helpful.

Thank you in advance.

Paul C.

EITHER: Volume Control On Sync Streaming Problem OR Loading External MP3 Not In Sync
Hi - I'm having a bit of a nightmare at the moment and would if you could pass any advice on the following, as I have been stuck on this for sometime.

As part of a menu screen, I have a background movie which involves a series of animations etc. This movie plays in sync with the music. This all works fine and is quite effective.

However, it has come to my attention that some of the users sometimes wanted to adjust the volume or mute it altogether. I have done many examples of this before previously, but became stuck when I realised for the music, all I did was import the MP3, and then dragged it right onto the timeline. From this, there is no variable/instance/linkage created to control the volume using setVolume. I tried to give a linkage name but was not affecting the main sync streamed music on the timeline.

SO following this, I decided at the beginning of the preloader to load the MP3 externally and play it as a stream, however this does not sync with the movie and falls out of time with it.

So all I need is a push to where I should go with this one.

All I want is for a MP3 to play in sync with the movie and I can adjust the volume of it also via actionscript during the movie.



- Is there a command I can use to sync the streaming external MP3?
- Can I adjust the volume of the initial sync stream via the timeline

Any ideas on this would be extremely helpful.

Thank you in advance.

Paul C.

Re-sync Out Of Sync Live Streams
Hi Guys,

I'm testing an application I've created. It's basically a 2-way A/V chat, with a text chat application on there as well.

Each user publishes a live stream, which is recorded on the server and then resent back down to the other user.

I've been testing it locally and everything is fine, so I signed up to Influxis on their Nitrous plan to give it a test run over the Internet.

Each stream is publishing a 32Kbps video + 8Kbps audio stream. Each user has a fast broadband connection, with around a 140 ping to the server.

Over time, around 10 minutes or so, the live streams get quite far out of sync. It can take over 20 seconds for the stream to reach the other person, making a "live" chat quite useless.

If I stop and start the streams again, it brings everything back into line, so I'm considering this as a potential resolution.

I'd really like to know why this sort of thing occurs, how I can minimise it, and how to recover from it when it does happen.

Any help would be appreciated!

[CS3] Lip Sync Out Of Sync With Stage
I have a mouth that I'm animating with the approach detailed in this tute:

http://www.youtube.com/watch?v=5uh3jhbCPbw

ie. it's a Graphic symbol within a Graphic symbol.

I've noticed that my mouth animation keyframes on the mouth symbol don't always match the same frame on the stage. For example, I set a keyframe at frame 326 in the symbol, but back on the stage I see that change happen at frame 330.

All the other frames leading up to that are in sync, and all after it are out by the four frames. What did I do?

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

Rights Of A Song
Hello,
I would like to know if you have to pay rights if you use a full song (not a loop) in a website.
Thanks in advance.

Syncing A Song
I have a .txt file with words in it and times.

example:

38.509105I
38.783629can
39.000587do
39.486482that
39.691871now

What I would like to do is print out all of the lyrics in a dynamic box and then highlight each word when an mp3 reaches the time to the left.


any help is greatly appreciated

Thanks

Song Won't Loop?
I have a song attached externally and it plays well but it doesn't loop?
I know there's a lag or pause with this type of song loading but it doesn't play at all. If anyone can help me or point me to an article let me know.

bgsong = new Sound();
bgsong.loadSound("song.mp3", true);
bgsong.start(0.05,20);

Thanks.

Loading Song, NaN ?
Hey, I have an mp3 on my little site, but when It is supposed to load, instead of the percentage number, its just says NaN, anyone know why?
Here my code:

Code:
AudioXml = new XML();
AudioXml.ignoreWhite = true;
AudioXml.onLoad = LoadXmlFile;
AudioXml.load(playListPath);
function LoadXmlFile(success) {
if (success) {
aPath = new Array();
asongTitle = new Array();
aAudio = new Array();
aAudio = this.firstChild.childNodes;
AudioTotal = aAudio.length;
for (i=0; i<AudioTotal; i++) {
if (aAudio[i].nodeName == "AudioProps") {
aPath.push(aAudio[i].attributes.path);
asongTitle.push(aAudio[i].attributes.songTitle);
}
}
AudioPath = aPath[0];
tAuthor = asongTitle[0];
AudioActual = 1;
tCount = AudioActual+" Of "+AudioTotal;
tText = "Xml Loaded";
} else {
tText = "Xml not loaded";
}
}
Ff.onPress = function() {
if (AudioActual<AudioTotal) {
AudioActual += 1;
AudioPath = aPath[AudioActual-1];
tAuthor = asongTitle[AudioActual-1];
MySound.stop();
Mystatus = "Press Play";
}
};
Rw.onPress = function() {
if (AudioActual>1) {
AudioActual -= 1;
AudioPath = aPath[AudioActual-1];
tAuthor = aSongTitle[AudioActual-1];
MySound.stop();
Mystatus = "Press Play";
}
};
PlayBtn.onPress = function() {
if (FlagPausa == true) {
MySound.start(SoundPausePos, 0);
FlagPausa = false;
SoundPausePos = undefined;
} else {
MySound = new Sound();
volume = 100;
MySound.setVolume(volume);
MySound.loadSound(AudioPath, StreamFlag);
FlagPausa = false;
_parent.onEnterFrame = function() {
TB = MySound.getBytesTotal();
BL = MySound.getBytesLoaded();
if (BL != TB) {
TheText2.text = Math.round((BL/TB)*100)+"% Loaded";
} else {
TheText2.text = "100% Loaded";
delete _parent.onEnterFrame;
MySound.start();
}
};
}
};
StopBtn.onPress = function() {
MySound.stop();
Mystatus = "Press Play";
};
PauseBtn.onPress = function() {
SoundPausePos = MySound.position/1000;
MySound.stop();
FlagPausa = true;
};
volUp.onPress = function() {
if (volume == 100) {
volume = 100;
} else {
volume += 10;
MySound.setVolume(volume);
}
};
volDown.onPress = function() {
if (volume == 0) {
volume = 0;
} else {
volume -= 10;
MySound.setVolume(volume);
}
};
Thanks,
fatnslow

Help With Xml Song Loading?
Hi!
I have a question,
I need to know how to make this file, load form a url instead of a path.
i know basic script. and virtually no xml. im assuming you change the word path to url in the xml... and then i dotn know how to fix the flash file. please help!

http://downloads.flashkit.com/movies...is_Jo-8416.zip

i want to do something like it for my bands site, but no clue how to work it.

thanks!

Song Stream
Ok I have this code for a song that I have streaming on keyframe 1... I have a second song streaming on keyframe 2... I was attempting with the following code to goto keyframe 2 and start playing the second song after the first one was completed with the following code.... but now its now working at all and im getting an output of "};"

the code:
stopAllSounds();
mySound = new Sound();
mySound.loadSound("Blazing.mp3", true);
mySound.onSoundComplete = function("Blazing.mp3", true) {
};
gotoAndPlay(2);

anyone have an idea?

thanks

Song Timer
Hey guys, I have no idea where to start with this.

I'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.

Any help would be great.

Thanks in advance

Help With Mp3 Player, Go To The Next Song
Hey gang.

I have this little radio I've made for a singers' site. It auto starts when the page is loaded, but just the first song. The artist wants the radio to go through the entire array of songs like a CD when the user is at the site. However, the radio also has a comboBox, so that users can select what song they want to hear and play it. That part all works fine EXCEPT making the autoplay part go to the next song after the first ends. This is the very simple AS I put on the movie to make the first song play when the movie loads. So how do I get it to go to the next item in the comboBox and then the next and then the next?

Any help would be greatly appreciated.

Thanks in advance!
.pete.


Code:
stopAllSounds();
var song = new Sound();
song.loadSound(cbSongselect.selectedItem.data, true);
nowplaying.text = cbSongselect.selectedItem.label;
song.onSoundComplete = function() {
stopAllSounds();
nowplaying.text = defaulttext;
}

Song Counter
does anyone know how to adjust kennybellews counter to track seconds and minutes when tracking a song?

this.onEnterFrame = function () {
myMusicPositionText=_root.track1.position/1000.;

};

this tracks milliseconds and seconds.............

thanks, teddy

Loading Song, NaN ?
Hey, I have an mp3 on my little site, but when It is supposed to load, instead of the percentage number, its just says NaN, anyone know why?
Here my code:

Code:
AudioXml = new XML();
AudioXml.ignoreWhite = true;
AudioXml.onLoad = LoadXmlFile;
AudioXml.load(playListPath);
function LoadXmlFile(success) {
if (success) {
aPath = new Array();
asongTitle = new Array();
aAudio = new Array();
aAudio = this.firstChild.childNodes;
AudioTotal = aAudio.length;
for (i=0; i<AudioTotal; i++) {
if (aAudio[i].nodeName == "AudioProps") {
aPath.push(aAudio[i].attributes.path);
asongTitle.push(aAudio[i].attributes.songTitle);
}
}
AudioPath = aPath[0];
tAuthor = asongTitle[0];
AudioActual = 1;
tCount = AudioActual+" Of "+AudioTotal;
tText = "Xml Loaded";
} else {
tText = "Xml not loaded";
}
}
Ff.onPress = function() {
if (AudioActual<AudioTotal) {
AudioActual += 1;
AudioPath = aPath[AudioActual-1];
tAuthor = asongTitle[AudioActual-1];
MySound.stop();
Mystatus = "Press Play";
}
};
Rw.onPress = function() {
if (AudioActual>1) {
AudioActual -= 1;
AudioPath = aPath[AudioActual-1];
tAuthor = aSongTitle[AudioActual-1];
MySound.stop();
Mystatus = "Press Play";
}
};
PlayBtn.onPress = function() {
if (FlagPausa == true) {
MySound.start(SoundPausePos, 0);
FlagPausa = false;
SoundPausePos = undefined;
} else {
MySound = new Sound();
volume = 100;
MySound.setVolume(volume);
MySound.loadSound(AudioPath, StreamFlag);
FlagPausa = false;
_parent.onEnterFrame = function() {
TB = MySound.getBytesTotal();
BL = MySound.getBytesLoaded();
if (BL != TB) {
TheText2.text = Math.round((BL/TB)*100)+"% Loaded";
} else {
TheText2.text = "100% Loaded";
delete _parent.onEnterFrame;
MySound.start();
}
};
}
};
StopBtn.onPress = function() {
MySound.stop();
Mystatus = "Press Play";
};
PauseBtn.onPress = function() {
SoundPausePos = MySound.position/1000;
MySound.stop();
FlagPausa = true;
};
volUp.onPress = function() {
if (volume == 100) {
volume = 100;
} else {
volume += 10;
MySound.setVolume(volume);
}
};
volDown.onPress = function() {
if (volume == 0) {
volume = 0;
} else {
volume -= 10;
MySound.setVolume(volume);
}
};
Thanks,
fatnslow

Help With Xml Song Loading?
Hi!
I have a question,
I need to know how to make this file, load form a url instead of a path.
i know basic script. and virtually no xml. im assuming you change the word path to url in the xml... and then i dotn know how to fix the flash file. please help!

http://downloads.flashkit.com/movies...is_Jo-8416.zip

i want to do something like it for my bands site, but no clue how to work it.

thanks!

Animating A Mp3 Song
Hello,
I'd like to use flash to animate a 3 minute mp3.
After importing it successfully I cannot drag it onto a frame without the program locking up.
Is there a file size limitation to what you can place in flash?

I'd also like to synchronize the animation to specific parts of the song.


thanks,
pearldive

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