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


Similar Posts:


ActionScript 2.0 :: Trivia Game - Flash Fade Out One Wrong Answer At A Time?

Mar 28, 2007

I am having a problem with a little trivia game that I am in the process of developing. What I am trying to do is have flash fade out one wrong answer at a time. All questions are being pulled from an XML file that has hundreds of questions. Keep in mind that the correct answer will not always be in the same spot. I also have it so that one question fades into another after a specific time. Here is the code

Code:
System.useCodepage = true;
//
function loadXML(loaded) {[code].....

View 8 Replies

ActionScript 3.0 :: Delete/remove A Movie Clip After The Wrong Answer Button Is Clicked?

Nov 20, 2009

How do I delete/remove a movie clip after the wrong answer button is clicked?

View 16 Replies

ActionScript 2.0 :: Quiz Game Where Answer Revealed After 3 Attempts

Apr 11, 2010

Basically I want to create 6 questions with input boxes next to them for the user to inset their answer. I want them to try three times and then if not correct the answer is displayed for them. In the box with a little description next to it.

Question: How many sides as a square
(answer in the box) = 4
(desc to side of box says) = A square has four equal sides.

View 3 Replies

ActionScript 2.0 :: Add Right And Wrong Sounds To A Game?

Apr 22, 2005

Does anyone know 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!

View 1 Replies

ActionScript 3.0 :: Get An Answer From Input Text Field And Compare It To The Correct Answer?

Jul 8, 2010

I am trying to get an answer from Input text Field and compare it to the correct answer.here is how my code look like:

//I have a confirm button here
confirm_button.addEventListener(MouseEvent.CLICK, ConfirmFunction);
//I have a correct answer as a String here
var correctans:String = "July";

[code]....

This will check if correct answer contains words in the answer from input text field.But that will result on if I key in "July is great", it will still link to the correct answer frame instead of wrong answer frame.I want the answer to be exact same as the correct answer.

View 4 Replies

ActionScript 2.0 :: Button Is Pushed A Answer Is Displayed And On The Answer Frame?

Aug 27, 2010

I have a grid with 12 movieclip buttons. When a button is pushed a answer is displayed and on the answer frame, there's a button "click for more information".

That button points to information in a frame within the mc button. However, when I test it all the buttons on the root timeline appear on top of this information, covering it up.

Also, when you move the mouse while in this "further info" area, it disappears

View 1 Replies

ActionScript 1/2 :: Picking Up Wrong Sound?

Sep 27, 2010

with attaching a sound to a movie using AS, in this case, it is a car tire that screeches when rolled over. I added a "tailpipe" idle sound when we roll over the tailpipe of the car. I have attached linking to the sound file named, "idle", and copied the "screech" AS code and edited, but now all the screeching tires have picked up the idle sound. All the movie mechanics work fine. Here's the AS Code:(T1 & T2 are the tires, tailpipe is the idle movie)

T1.stop();
T1.onRollOver = over;
T1.onRollOut = out;

[code]....

View 1 Replies

ActionScript 3.0 :: Adding Decimals Giving Wrong Output

Apr 24, 2009

I faced a strange problem today while adding some decimal number in AS3. I have simply adding trace(1.025 + 0.025); statment. It didn't returned proper output i.e. 1.05., instead it has given as 1.0499999999999998.
 
know the reason behind this. Actually we are calculating some angle and leng in geometric function.And we are getting some diffrence in calculation.

View 3 Replies

ActionScript 3.0 :: Sound Repeats From Game To Game

May 19, 2010

We have a bug in one game whereby the sound of the word repeats. Even when we use stopAllSounds - the sound is still kept in memory and you can hear it in the next activity - it's a disaster and kids get real angry.

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

Creating A Game / Adding Power-ups

Sep 6, 2009

I've been wanting to learn to work with Flash for awhi l e and decided to start learning by attempting a game. I found a decent tutorial for a space shooter and used it to create the basic code (firing, etc...) and now I've been figuring out how to add other elements (splash screen/scrolling screen).now I'd like to add power-ups but can't figure out how.I've created a graphic, turned it into a movie clip, but can't think of what to define for its actions.

View 2 Replies

ActionScript 2.0 :: Adding A Timer To Game

Oct 8, 2006

I've been trying to make my own flash game based on the kirupa tutorial: url...My scripting is very similar to the scripting in the tutorial, but I obviously adapted it to my own design. Now I�m trying to add a time limit, which when the time reaches 0 it jumps to the time up screen. I have spent two whole days searching on google, trying loads of suggestions, trying to figure this out myself.[code]This scripting works on a test page (i.e. away from the actual game) but when I try to add it to my game it deletes the main movieclip (in this case a tank) which is used to play the game.

View 3 Replies

ActionScript 3.0 :: Flash - Adding Time To A Game Timer?

Mar 21, 2011

've created a simple flash game for moving a car round the flame to collect fuel cans and avoid traffic cones. The game has a 10sec timer running but i want to make it that if u hit a fuel can it adds 5secs to the timer and if u hit a cone it removes 2secs.This is my code so far

var fuelpoints = 0;
var conepoints = 0;
startButton.visible = true;

[code]....

View 1 Replies

ActionScript 3.0 :: Adding Game To Flash File - Load Assets And XML

Feb 29, 2012

I am trying to add games to a Flash file. They are in different folders and the assest and xml information is not coming with it? I get the error :
"[BulkLoader] Error loading LoadingItem url: images/, type:text,
status: error Error #2032: Stream Error. URL:
file:///G|/%2D%2DWORK%2D%2D/Gilcrease%20Projects/Kravis/images/
Here are the files I need to load into the main file.

View 11 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 :: Sound Effects Not Playing On Flash Game

Jul 23, 2011

I've been working on a flash game, and recently added in sound effects. However, the sound effects only seem to play the first half-second of the audio file whenever I call on them to. I have been using the standard code.

ActionScript Code:
on (rollOver) {
if (_global.sound) {
_global.SFX1.start(0,1);
}}

But the sound effect only plays through a small amount of the audio. Also, the sound effects are not very stable, and will only play the butchered audio if there is some time in between clicking on several buttons. The odd thing is that I took the same code to another flash file, and the audio played through all the way with no problem, not requiring any additional time to play the sound effect again. I used the same code to load the sounds, which is

ActionScript Code:
onClipEvent (load) {
_global.Music1 = new Sound();
Music1.attachSound('Music1');
_global.Music2 = new Sound();
Music2.attachSound('Music2');
[Code] .....

View 8 Replies

ActionScript 3.0 :: Insert A Sound Inside A Class Of My Game?

Jan 3, 2012

So i am trying to insert a sound inside a class of my game. In the constructor function i declare the variable private var retDamage3:Sound = new Sound();

and in the place i want it to play i put this code retDamage3.load(new URLRequest("sfx/destruirbarra.mp3"));
retDamage3.play(); Except it gives the error:

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 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

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

ActionScript 2.0 :: Playing Sound When Character Touches Coin In Game?

Jul 5, 2011

I'm currently making a flash game and to insert sound. The sound effect has to play everytime the character touches the coin yet the coin still has to be able to unload. I never used sound before in flash.

View 1 Replies

Flash :: Professional - Linking Sound Bytes To Game Without Having To Put It On The Stage

Apr 26, 2011

I am currently having a problem with Flash CS5. I am trying to link a sound file to my Flash game without having to put it on the stage. It would play when my character got hit by an enemy. The problem is is that when I go to edit the properties, all of the options except to play the sample are all blanked out. This is currently driving me insane as I have done everything I could think of to get around this.

View 1 Replies

ActionScript 2.0 :: Making A Tycoon Game And Have A Few Queries To Do With Controlling Sound?

Oct 17, 2009

I'm making a tycoon game and have a few queries to do with controlling sound. I have two buttons, one is my play button playBTN and my other is my stop button stopBTN. Now i want to play the song mainSong using actionscript from the second frame, but I also want to play the song without it going over the top after you release playBTN.

P.S: I'm sure the stopBTN code is:
ActionScript Code:
on(release){

[code]......

View 5 Replies

ActionScript 3.0 :: Game Runs Slowly And The Sound Effects Began To Lag?

Oct 22, 2010

I am trying to play sounds in my Flash gameAt times, the game runs slowly and the sound effects began to lagI noticed that all of the sound effects that are played using AS3 sound and soundChannel objects (which are held in an array and are triggered by a Click Event listener function) are lagging worse that sound effects which are played from within MovieClips timelines (These MovieClips are played using gotoAndPlay() which is called by a different Click Event listener function.) I am wondering why this is happening. I assume that anything done within Actionscript would be processed faster that anything done on a timeline.

View 0 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







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