ActionScript 2.0 :: Adding Sound To A Movieclip?

Mar 3, 2011

i wan't to make a game where the character jumps when i press a key, but i also wan't to play a "jump" sound when the player press the "jump" key. I tried to use this:

ActionScript Code:
onClipEvent(enterFrame) {
if (Key.isDown(Key.SPACE)) {
kirupaSound = new Sound(this);

[Code].....

But it didn't work very well. When i pressed the "space" key it played the sound like 20 times untill it stopped.. It just continued to play the sound. Preview:megaswf(.)com/serve/1031811

View 8 Replies


Similar Posts:


ActionScript 2.0 :: Adding Sound To Movieclip Button?

Dec 14, 2004

I have a movieclip button that I want to add a sound to when press can someone tell me how to do this? The code I have for the contact form is:

stop();
//-----------<send form>------------\
//-----------</send form>------------\
//--------------------<submit button AS>---------------------[code]...........

View 3 Replies

ActionScript 2.0 :: Adding Sound To Movieclip Button

Dec 14, 2004

I have a movieclip button that I want to add a sound to when press can someone tell me how to do this? The code I have for the contact form is:

[Code]...

View 3 Replies

ActionScript 1/2 :: Sound Control Adding Text Into The Linkage Field But Still Sound Doesn't Work

Jan 21, 2010

How to import sound with AS? Cuz i have tried it and my sound just wount play. Can you explain me where my sound should be and what is the as code for importing cuz i use

mysound = new Sound();
mysound.attachSound("SoundOn");
mysound.start();

and this SoundON from where i get it, i try to add linkage to the sound file but in CS4 i cant find the option;. I do it from the library, adding text into the linkage field but still my sound doesn't want to play?

View 15 Replies

CS3 : Adding Sound To A Button?

Mar 25, 2009

I am having problems with a flash template that I am redesigning. Currently when the movie loads it automatically starts a song in the background. When you click my music navigation link my music page comes up and there are a few links there that I want to add music to. I also need to stop that background music so the song from the link can play.

View 1 Replies

ActionScript 2.0 :: Adding Sound - Doesn't Come Out

Jan 12, 2010

I am doing a game such that when the score++, there is a certain sound. And when the score--, there is another sound. Cause I'm not really sure if this is the correct way. So I have two sound files, linkage "hit" and "miss" The actionscript goes like this on my movie clip:

[Code].....

View 2 Replies

ActionScript 3.0 :: Adding Sound / Mp3 File

Mar 9, 2009

I am very very new to flash...I created a quick little slide show...in which I want to add to add an mp3 file too...the slide show works as such.. Each frame has a picture and next button, so when I test the movie. The pictures are stopped, I click the next button and it
goes to the next frame......pretty straight forward. How do I add sound? I just want the music to start when I open it, and stop when the slide show is over.

The funny thing is...if I insert music into a file with no buttons and just let it stream (and stop on the last frame) it works great, the music plays...Only now that I have a movie with buttons, it doesn't even start. I have been thumbing around the actions panel, but for the most part I'm lost.

View 6 Replies

ActionScript 1/2 :: Adding Sound To A Movie?

Sep 14, 2010

adding a simple sound to a movie with AS?  I'd prefer this, since I already have simple "Roll On", and "Roll Out" script in place.
 
I have imported the sound file. In Properties, under Label, I have named it "tire_squeal". (Also, created a layer within the movie, and dragged the file onto the stage - all done.)  Is this necessary when using Actionscript, or not?
 
The sound file loaded into my Library is named, "tire_screech.wav"
 
I want the sound to load "stopped", then play OnRollOver, and quit OnRollOut. (See previous AS code in string.)

View 7 Replies

ActionScript 3.0 :: Adding Sound To A Spinner?

Feb 28, 2011

so i am making a spinner and i want it to be like a see and say toy. How would i go about adding sound so that when the spinner lands on the picture that the sound will play. I have pictures and I have sounds. how would i do this?

View 2 Replies

ActionScript 2.0 :: Adding Sound In Presentation?

Dec 17, 2003

i have a presentation and i have more then 1 scene is there a way to have music playing thoughout them all?

View 1 Replies

ActionScript 3.0 :: Adding Sound On MOUSE_OVER?

Nov 18, 2009

how can I add sound to a button on rollover?

I have tried this but the sound plays when the page is loaded aswell as when ouse over.

Code:
var aboutBtnsnd:Sound = new Sound(new URLRequest("clook.mp3"));
var aboutBtnchannel:SoundChannel = aboutBtnsnd.play();
var aboutBtnpausePosition:int = aboutBtnchannel.position;

[Code]....

View 3 Replies

Professional :: Adding Sound To Flash Movies?

Mar 29, 2011

When I tried to import music to flash animations I have created, I received error message that: One or more files were not imported because there were problems reading them.
 
The platform: Mac AA audio file Encoded with iTunes 10.1.2, Quick Time 7.6.6
  
Is it because of the audio file format that music cannot be imported? If so, how can i convert it to the compatible format?

View 5 Replies

ActionScript 3.0 :: Error #2044 By Adding Sound?

Aug 15, 2011

i'm trying to make a little game for a school assignment. The problem is, when im adding sound to my game, this error appears:

Error #2044: Niet-afgehandelde IOErrorEvent:. text=Error #2032: Streamfout.
at herkansing/controleerOpHit()[C:UsersChrisAdobe Flash Builder 4herkansingsrcherkansing.as:145]

[code].....

View 2 Replies

ActionScript 3.0 :: AIR For Android - Adding Sound To The Application?

Oct 1, 2011

I tried something I did on a soundBoard I made with an external folder, but then I thought that folder will never be added on the phone, so how am I going to do this?

View 7 Replies

ActionScript 2.0 :: Adding A Rollover Sound To Movie Clip?

Dec 30, 2009

i'm trying to add a rollover sound to a movie clip. i've read a bunch of tutorials but I can't seem to get it working here is the code for the first frame of my movieclip:

stop();
this.onEnterFrame = function(){
if(rewind == true){[code]....

View 2 Replies

Actionscript 2.0 :: Adding Sound To A Custom Flash Cursor?

Jan 16, 2009

I made a movie clip button, which is a custom cursor, and i want to know if it's possible to add a clicking sound into it. Or is there any way for a sound to be played everytime the custom cursor is in the clicking state??

View 2 Replies

ActionScript 3.0 :: Adding Sound To A Movie Clip Button?

Oct 22, 2008

I'm trying to figure out how to add a sound to a movieclip button so when the user clicks on it a sound is played.

View 10 Replies

ActionScript 3.0 :: Adding Sound To An XML Based Photo Gallery?

Nov 15, 2008

I was wondering how I could add sound to a gallery that is driven by xml.I have a gallery that loads the picture, Title and description. the gallery is downloadable here.The regular gallery loads a web page when the picture is clicked. I am trying to make each picture load a different mp3.I have the general Idea of how it would be done but I don't know how put it to actionscript.I figured you would basically create a sound object that loads the specific mp3 from the xml file when the picture is clicked from the gallery.I think I might have some what of the idea right but I get an error everytime I load the swf file.

"ArgumentError: Error #2068: Invalid sound.
at flash.media::Sound/play()
at MethodInfo-6()"

[code].....

View 3 Replies

ActionScript 2.0 :: Adding A Sound Clip To Collision Scenarios

Apr 24, 2002

Can someone tell how to add a soundclip (*.wav) to the following scenario:[code]

View 2 Replies

ActionScript 3.0 :: Adding Sound - Is It Taking Time To Load

Mar 28, 2010

I have built a SoundClass which handles my sound. Any time I want to call upon a sound, I call upon the class and its function. Problem is, there is like a buffering time or something. For instance, when I jump with my character, I am trying to play the jump from the SoundClass I created. It plays, but takes about 3 seconds. Btw, it does this regardless of if its in its own class, or in the same class I am calling it from. The jump.mp3 is only 4KB.

Here is how I have it set up

Code:
package {
import flash.display.Sprite;
import flash.events.*;

[code]....

If I am in another class, I can call upon this by using "soundClass.jumpS();" It plays, but takes a few seconds. I have a trace on the function jumpS() and it traces immediately.

View 2 Replies

ActionScript 2.0 :: FMX Game - Adding Sound For Wrong And Right Answer?

Apr 22, 2005

Any tutorials on adding right and wrong sounds to a game? Im making this game where on a wrong answer there is a wrong sound and on a right answer a right sound! How to get the code to do this!

View 1 Replies

ActionScript 3.0 :: Adding Event Listeners For Movieclip Inside Movieclip?

Nov 5, 2010

I have a movieClip button in my library that I dynamically add multiple instances of to the stage using code (so each instance has a unique name). The button has two frames, so it has a basic rollover effect (just changes color. To make the rollover work, I've had to dynamically add an event listener to each new instance of the movieclip, which triggers the rollover function.

I was wondering, instead of adding an event listener each time, can I somehow have an event listener within the movieclip to take care of the rollover?  Or will it not make any difference to the number of event listeners, as it will still add a listener with each new instance of the clip?

View 1 Replies

ActionScript 3.0 :: Adding Two Functions To One Button (gotoAndPlay - Stop Sound)

Dec 10, 2010

I`d like to say that i`m total newbie regarding to as3. Ok, lets look at my problem.. I have 2 scenes (first is main menu with New Game button; second scene is intro for game). I`m having difficulties to make two functions within one button. Why do I need that? First function is to go to next scene (in my case, IntroScene). Second is for turning off sounds, so I can`t hear them in next scene. Here is the code:

[Code]...

View 9 Replies

ActionScript 2.0 :: JSFL Script For Adding Sound Files To New Layers?

Jul 12, 2008

I have 1012 different sound files named Sound 1, sound 2, sound 3, etc. On the second frame I created a storage movie clip to house them all. What I need to do is add a layer for every sound in the MC and add one sound to each one. Now instead of making 1012 layers by hand, is there a JSFL file I can use to do it for me?What it needs to do is add one layer, add sound 1, and hit stop in the properties. Then it should add another layer, add sound 2, and hit stop in the properties.

View 4 Replies

ActionScript 3.0 :: Adding Movieclip To Main Movieclip

Mar 25, 2012

I have a scrollpane in my library.Inside a movieclip, I create an image gallery and add it to the scrollpane.I do this in this function.[code]Now everything works fine, and no problems occur.I do however get the runtime error TypeError: Error #1009: Cannot access a property or method of a null object reference. at fl.containers::ScrollPane/endDrag()It doesnt seem to affect my file, but I am sure it would be better to try and get rid of it.I think it has something to do with adding my movieclip to the main movieclip, and maybe.I am not removing it when I add a different movieclip.Whenever I add a movieclip to the main one, I use container_mc.addChild(...);Does addChild check to see if a movieclip already exist, and remove it if it does? Or do I need to remove my clips beforehand?

View 2 Replies

Flash :: When Adding A MovieClip To Another MovieClip, It Does Not Display?

Feb 28, 2011

I have a MovieClip called chipmovie which I have exported to a class method called ChipMovie, when I try and add it to another movieclip, for some reason it doesn't display.
I have checked Export for ActionScript and Export in Frame 1.The code that adds it to the MovieClip is as follows:

public function addChip(chip:Number)
{
var newChip:ChipMovie = new ChipMovie();[code].....


In the output it says:

init y = -151 height is 0

for all the ChipMovie objects I try to add.

View 2 Replies

IDE :: Adding MovieClips To MovieClip?

Apr 24, 2010

I'm trying to split my stage into 2 sections

- bubbleZone
- menuZone

so I have created 2 sections and turned them into movieClips. On the first bubbleZone movieClip I want to add multiple "bubble" movieClips which will only appear in the bubbleZone movieClip. See code below. However, the bubbles seem to be appearing all over the stage and are hidden by the bubbleZone movieClip. Is there anyway to make the bubbleZone movieclip pretty much just a background for catching events and then tying the individual bubbles to just the bubbleZone so they don't appear anywhere else on the stage?

var bubbleZone:BubbleZone = new BubbleZone();
bubbleZone.vx = 1;
bubbleZone.height = 600;
bubbleZone.width = 820.8;

[code]...

View 2 Replies

ActionScript 3.0 :: Adding Typewriter Sound To Typewriter Code?

Dec 12, 2009

For the typewriter effect, I'm trying to add a typewriter "click" sound every time this function (within a class) writes a letter:

private function setLetter(n:Number)  {
var correctLetter:String = text.charAt(n);  var part1:String = text.substr(0, n); temp_text = part1 + correctLetter + cursor; 

[code].....

View 2 Replies

Adding Batch Pictures To MovieClip

Apr 1, 2009

I have 290 transparent .png image files that i would like to be quickly added to a movie-clip so that i can use it as an animation. (As2 or 3 either way).

The pictures are all the same height/width and format. Is there a quick way i could import them to a movieclip quickly, as manually drag and drop into the movieclip is tiring?

View 1 Replies

ActionScript 3.0 :: Adding Movieclip To Stage?

Jun 15, 2009

My code is this:

Code:
stage.addEventListener(MouseEvent.CLICK, addBullet);
function addBullet(event:MouseEvent):void {
var bullet:MovieClip = new bshot();[code]....

bshot is a movieclip in my library with the class name of bshot as well.i do not understand when i click i do not get a bullet being added to the stage?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved