# music is always timed differently

• susancbk
• Proficient
• Joined: Nov 13, 2004
• Posts: 293
• Loc: New York City
• Status: Offline

February 8th, 2005, 6:12 pm

I have a movie that is supposed to coordinate with the music. However, whenever I play the movie it seems the music moves around. '
Ex. music will match a motion perfectly -- but next time I go to play it the music happens too fast or vice versa.

The changes weren't noticible on my home computer, but when I played it on a much faster computer the changes were significant.

Why is it doing this? and is there anyway to prevent it?
• Anonymous
• Bot
• Joined: 25 Feb 2008
• Posts: ?
• Loc: Ozzuland
• Status: Online

February 8th, 2005, 6:12 pm

• yuriythebest
• Banned
• Joined: Feb 24, 2005
• Posts: 143
• Loc: Ukraine
• Status: Offline

March 24th, 2005, 11:44 am

It's all a matter of processor speed, some will slow down on the graphical side and the music will be the fist in the race. You could though split the music iinto sections (eg 30 seconds) using a proggie like soundforge and reassemble them back in flash. that would minimize the effect.
• mikeroesoft
• Newbie
• Joined: Jul 31, 2004
• Posts: 6
• Loc: London, England UK
• Status: Offline

March 29th, 2005, 2:19 am

Hi susancbk

You could try breaking up sections of the movie and the music into intervals.

Each time you play the movie you could set all intervals by clicking a button.

This way, all sections of music and the movie would remain synchronised.

Your problem sounds similar to one I had where each time I played my movie, certain sequences were out of time. Using intervals fixed the problem. This solution might work for you.

This is the synatax for creating an interval:

music_interval = setInterval(MusicPlayFunction,60000);

The above code allows a function to play some music for 60 seconds.
The paramaters to the setInterval function are (1) the function that is timed (2) the length of time for the function.

This is how you clear an interval.

clearInterval(music_interval);

You could start the movie from a button with all your sequences inside it:

on(press){

interval1 = setInterval( music, 10000);
interval2 = setInterval(dialog, 10000);
interval3 = setInterval(effects, 10000);

function RunEveryThingAbove(){
gotoAndPlay("frame that starts everything");
}
}

Then stop everything with a second button:

on(press){

clearInterval( music);
clearInterval(dialog);
clearInterval(effects);

function StopEveryThingAbove(){
gotoAndPlay("frame that ends everything");
}
}
}

Give it a try. I hope it helps.

mikeroesoft

## Post Information

• Total Posts in this topic: 3 posts
• Users browsing this forum: No registered users and 34 guests
• You cannot post new topics in this forum
• You cannot reply to topics in this forum
• You cannot edit your posts in this forum
• You cannot delete your posts in this forum
• You cannot post attachments in this forum

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.