Not really good with actionscript but ill try to explain as best i can.
I have in frame 1 the following:
stop();
stopAllSounds();
//s.stop();
KeyListener = new Object();
KeyListener.onKeyDown = function() {
if (Key.getAscii() == 113) { // Code for q key
gotoAndPlay(12);
}
Key.addListener(KeyListener);
Pressing key "q" takes you to frame 12. On frame 12 i have the following code:
stop();
s = new Sound();
s.attachSound("baywatch");
i=1;
function timeme (){
now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
_root["nowtime"+i] = (Number(hours)*3600)+(Number(minutes)*60)+seconds;
_root.newstarttime = _root["nowtime"+i] - _root.nowtime1;
i++;
}
s.stop();
s.start(_root.newstarttime);
KeyListener = new Object();
KeyListener.onKeyDown = function() {
if (Key.getAscii() == 117) {// Code for u key
s.stop();
timeme();
soaps.stop();
buzzer.gotoAndPlay(65);
}
else if (Key.getAscii() == 121) {// Code for y key
s.stop();
timeme();
soaps.stop();
buzzer.gotoAndPlay(2);
}
if (Key.getAscii() == 109) {// Code for m key
gotoAndStop(1);
}
if (Key.getAscii() == 101) { // Code for e key
soaps.play();
s.stop();
s.start(_root.newstarttime);
}
};
Key.addListener(KeyListener);
THere are 2 movies you can see in the code "buzzer" & "soaps"
SOAPS is a simple movie that plays from start to finish
BUZZER is a movie that flashes up a colour on screen and plays a buzzer sound at the same time.
everything sounds fine when i play the movie. However when pressing the "m" key therefore taking the movie back to the start, I lose the sounds attached to the buzzer movie only. I cant figure out why.
To see the movie in [COLOR=blue !important][FONT=verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif][COLOR=blue !important][FONT=verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif]action[/font][/font][/color][/color]:
http://chops.orchardhostings7.co.uk/gameshow_mask.html
Once loaded you'll need to press "3" to jump to the right movie
When it says "READY" press the letter "q" - this starts the movie
Pressing "y" + "u" will play the buzzer sounds. Once a buzzer is pressed the movie "soaps" pauses.
To resume the movie press "e"
Finally to restart press "m" <---this is where the problem start.
Thank in advance


Reply With Quote

Bookmarks