NNKL.COM
welcome to my space
X
Search:  
 HOME   add in sound clips to games
add in sound clips to games
Published by: rose 2010-03-15
Welcome to:nnkl.com

  • hi..
    anyone willing to help me..to put in some sound clips for the actions in my games. i have 12 games..altogether... anyone?


  • Easy you don't need any code.
    In the rat MovieClip select the frame with the "whack" label and add the sound as event sound.

    :)


  • if u already have the sounds, import them to the library, then right click them and select linkage and check export for actionscript, give it an identifier in there too.

    then create the sound instance:
    onClipEvent(load){
    explosion=new Sound()
    explosion.attachSound("explosion_sound") //put the identifier u gave
    }

    and for playing it say when a hittest happens

    onClipEvent(enterFrame){
    if(this.hitTest(_parent.some)){
    explosion.start()
    }
    }


  • post the sound code that didnt work so we can take a look at it

    (tip: dont post the .fla most people, or at least me, are too lazy to download stuff, correct it, and upload it):pleased:


  • thanks for the message. I tried with the scripts but it's not workin. do u want to have a look on the codings? perhaps mayb you can suggest me the right scripts for my games...what do you think?


  • //this game something like a magic crystal ball which gives responses every time the user clicks on it.

    //where do i attach the sound script in this game when the response appear in the crystal ball??



    on (release) {
    // all possible responses to appear in the ball
    responses = new Array();
    responses.push("Yes");
    responses.push("No");
    responses.push("Never");
    responses.push("It is certain");
    responses.push("Doubtful");
    responses.push("Maybe");
    responses.push("Definitely");
    responses.push("No way!");
    responses.push("Certainly!");
    responses.push("Looks positive");
    responses.push("Looks negative");
    Michael Dorn (I) - Sound clips::
    IMDb > Michael Dorn > Sound clips. Add/Change Photo Add Resume. at IMDb Resume. Contact Info Playing | News | My Movies | Games | Boards | Help | US Movie
    http://www.imdb.com/name/nm0000373/soundsites
    HOME

    // get number of responses
    n = responses.length;

    // pick one random response
    r = Int(Math.random()*n);

    // to place the response in text area
    fortune = responses[r];

    // to start the animation
    gotoAndPlay(2);
    }


  • how do i use masking to combine all my sub games to the mail flash file?


  • //game function would be, a rat will pop-out from the a whole randomly and the player has to whack the rat.

    i need to insert a sound clip whenever the user "whacks". where do i insert the sound clip script for this action.


    onClipEvent (load) {
    // how much time between rat appearances
    timeBetweenRats = 2000;

    // to calculate time until next rat
    nextRat = getTimer() + timeBetweenRats;

    // init scores
    score = 0;
    numRats = 0;
    }

    onClipEvent (enterFrame) {
    // to see if it is time for the next rat
    if (getTimer() >= nextRat) {

    // to shorten wait next time
    timeBetweenRats -= 10;

    // to see if the game is over
    if (timeBetweenRats < 1800) {
    _root.gotoAndPlay("End");

    // a new rat
    } else {

    // to increase count and update score
    numRats++;
    _root.showScore = score + "/" + numRats;

    // to loop until a rat is found that is
    // not in use
    while (true) {
    rat = Int(Math.Random()*18);
    if (_root["rat "+rat]._currentFrame == 1) break;
    }

    // to tell rat to pop up
    _root["rat "+rat].gotoAndPlay("popup");

    // set time for next rat to appear
    nextRat = getTimer() + timeBetweenRats;
    }
    }
    }


    onClipEvent (mouseDown) {
    // get the location of the click
    x = _root._xmouse;
    y = _root._ymouse;

    // loop through all 18 rats to see which was clicked
    for (i=0;i<18;i++) {

    // look only at clips that are doing thepop up animation
    if (_root["rat "+i]._currentFrame > 24) {

    // to see whether this was the one clicked
    if (_root["rat "+i].hitTest(x,y,false)) {

    // play the clip "whack" animation
    _root["rat "+i].gotoAndPlay("whack");

    // increase score and show it
    score++;
    _root.showScore = score + "/" + numRats;
    }
    }
    }
    }





  • Get Smart About Monitoring Virtual Machines
    Microsoft Gets Ex-Streamly Cozy with U.K.'s MediaWave

    You are looking at:nnkl.com's add in sound clips to games, click nnkl.com to home
  • i broke something of my boyfriends help
  • computer s
  • how cani contact the jonas brothers
  • what does hard nipples mean
  • is there anyway i can contact the jonas brothers
  • i don 039 t know what to do please help
  • how do i get rid of a virus on my computer
  • what is this ridiculous video called
  • guys my computer is totally blocked by malware how can i install an anti virus program
  • does anyone know how to contact the jonas brothers so they 039 ll actually read some of the stuff
  • does anyone know how i can uninstall a program called virusresponse lab 2009
  • help i wanna get my ears double peirced
  • jonas brother contact
  • wpa2 psk encryption is nearly impossible to break
  •  
  • guys i have a loud laugh is it cute
  • does anyone have real jonas brothers contacts
  • does this sound pathetic i hug a teddy bear when i 039 m really upset
  • i really want the jonas brothers to perform at my sweet six party but i don 039 t know how to contact them
  • i need your op ppl pplz
  • jonas brothers do you think they 039 d come
  • why is she doing me like this
  • what do u text with guys about
  • is it true that some guys dont like kissing people
  • what shoud i wear tonight
  • hey does anyone know how i can contact the jonas brothers threw either fanmail or something
  • how do i get to know her help please
  • im an 18yr old girl and i 039 ve had before is that bad
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 nnkl.com        Site made:CFZ