Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

+ Reply to Thread
Results 1 to 2 of 2
  1. #1

    Default Sound loading issue (could be simple)

    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

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2

    Default Re:

    I am a composer; I used to download music from internet. if you need some specific sound effect like Game Sound Effects, Animal Sound Effects etc try Audiomicro,it is very popular for music and sound effects. It’s not free but very well priced and then you are free to use the music forever.


    _______________
    p.s. Check out my stock music

    Last edited by WHITEHY; 03-19-2011 at 06:26 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial