ActionScript 2.0 :: Make An On / Off Sound Button?
Apr 18, 2011
So i want the sound button to be both the same on and off like [code]...
So i want to know WHAT as2 code can i make to make it so out of the on &off button can be the SAME button on the SAME button can have the SAME on button SAME off button when you click the same thing.
View 2 Replies
Similar Posts:
Jul 28, 2009
I have several buttons in a movie and I want to be able to rollover an individual button and play the sound for that button and when I rolloff I want the sound for that button to stop.
View 6 Replies
Sep 4, 2008
I've been trying to make a button to play a sound, I've created the button and have a sound in the library, but can't manage to get the button to play the sound!!! I get this error: 1120: Access of undefined property knock_sound.
I think I need to give the sound an instance name but it says I need to use AC2 to do that!!
View 3 Replies
Mar 26, 2011
I have been working on flash in school, and the school upgraded from flash MX to flash CS5, i have then gone to make my project in AS3, however, it is very diffrent from AS2
My problem, is, all i want is a button to play a song from the libray (not from a URL on the internet like the code snippet) and my ICT teachers have no idea how to use AS3. I also need is a play, stop and pause button, and a volume control slider, i CAN do all these on AS2, i infact have it set up (but without a pause button) but, i cannot do this in AS3 and i need it done bady.
View 4 Replies
Jan 29, 2009
I am trying to make a button turn on/off a sound when pressed. I have tried to code it, but it does nothing everytime.
I have a sound in the library, with a linkage name of "sound" it is on the first frame in the main timeline. And i need a button to turn it off, and then on again.
View 0 Replies
Jun 22, 2004
I have a button that is actually a Movie Clip (so I can animate it). I want this button to play a sound. (But this isn't a sound question.) If I have a list of 20 sounds, and 20 instances of this button mc, how can I make it know which sound is being called for? If it were a normal button, each instance would have its own load- or attach-movie command. But since they're MC's, the invisible button hit is always the same. Is there a way to make it look to the MC's instance name to get which sound to load?
View 14 Replies
Dec 18, 2008
I am using the Button component (the one shipped with CS3) inmany places in my AS3 project. I am coding in .as files, not on thetimeline.I have skinned the Button to use the colors I like. Now Iwish to "skin" it so that all instances generate a rollOver sound,and I'll be darned if I can figure out how.I know I can listen for ROLL_OVER events in each Buttoninstance. But I have many many Buttons and it seems kludgy to addthat same code to every class I have which tracks a Button. I amhoping there is some way I can make *all* instances of Buttonrespond to rollOver the same way. I am hoping it is likesetComponentStyle or changing the skin for the Button; I can do itin one place and it works everywhere.I guess I can listen on the Stage level for bubble-ups ofROLL_OVER, trap those that come from Button instances, and handleit from there, but stagewide listeners also seem a tad kludgy
View 1 Replies
May 18, 2007
I use Flash MX 6.0
1) I have a button and when I put cursor over it, it must start looping a sound. When I drag away, the sound must stop. I would be even cooler if it was possible to make the sound fade away when the mouse is rolled away. I have no problem creating another sound file that fades my current sound away.
2) I have a button which represents a knife, that should stab something (a panel) once pressed. So fist the knife must be clean. but after one or more presses, the blood should remain as a movie clip (as I want to animate the dripping blood)
3) once rolled over a button, the sound must start looping (as I wrote in 1.) AND the knife should slowly go backwards (MC). BUT when I roll mouse away, the sound fades away (as in 1. again) PLUS the knife should slowly move back to its place in stead of just jump from one place to another.
View 1 Replies
Apr 15, 2010
I've assigned a sound to the button over frame and a different one to the button down frame. When i over over the button the button over sound plays. When I then click the button, the button over sound plays AND the the sound I put in the button down frame plays.
View 8 Replies
Sep 21, 2011
how to add mute sound and unmute sound script in a single button?
View 2 Replies
Aug 5, 2010
I have a bit of a problem with sound.. I have a main container animation with background sound that's loaded with soundChannel..I also have an externally loaded SWFs with Movie Clip buttons that have a sound ON ROLLOVER on the timeline..after rolling off - I place the:SoundMixer.stopAll();to stop the button from playing the sound once the mouse is rolled off.. However, the problem I'm running into is that it also stops the sound of the main container movie cli
View 1 Replies
Oct 19, 2010
I'm sure this is a common problem, I tried looking around on the forum for a problem like mine but was unable to find anything. I'm using Flash CS3, Actionscript 2.0, and am making a soundboard. I have two scenes, one that's the title screen, of which has a sound file loaded via the timeline, (I think) set to Event and Loop, and a button which takes you to the next scene and makes a short sound when it's pressed. My second scene has background music as well, also set to Event and Loop.
Problem is that when I press the button, the background music keeps playing into the next scene. I tried using putting stopAllSounds onto the button, but that makes the sound of the button stop as well, and I'd really like to keep it. I've been messing with this for days, and I can't figure it out.
View 3 Replies
Feb 13, 2007
i want to make a single button to play a sound, and if pressed again, stop the sound. and if pressed again, play the sound, and so on...
i know it has to be made with a boolean variable, true/false, but i just can't figure out how.
View 13 Replies
Nov 10, 2011
basically i simply want to give the option of turning of the sound in my flash via a button (If you press it sound goes mute, press it again sound unmutes) I searched around in the tutorials but i could only find (for this purpose) complicated pan sound control stuff.
View 1 Replies
Aug 5, 2010
Need to make a character start to talk when the sound starts and stop talk when the sound stops so I'm using this:
[Code]...
View 2 Replies
Jan 29, 2011
i'm designing a website in flash8... now i have created some buttons, and i want that when i click on the button stars will fly from them and there will be a sound... i have already created the animation of the stars seperatly and it's in the library, i have also the sound file.... i just can't remember how to put everything together.... when i'll press on the button the stars will be flying from the button and the sound will play?
View 3 Replies
May 22, 2011
I want to stop the sound loop from one button by clicking new button. Does anyone know the code that would stop one button's sound from looping by just clicking another button (for another sound)?So you have these buttons:button 1 button 2 button 3 button 4and after clicking "button 1" a sound loops. when i click "button 2" i want the sound from "button 1' to stop.
View 2 Replies
Jun 8, 2008
I'm using this code to play/stop a sound in my flash movie, but I can't figure out how to make it loop. What do I need to do?[code]
View 3 Replies
Nov 24, 2009
How you make sound affects
View 1 Replies
Nov 22, 2010
i am creating a web page and my problem here is that on my intro part or home part there is a sound playing but if i will go to other pages the sound should stop playing.
View 5 Replies
Sep 5, 2011
So I exported a preview of my animation but the sound isn't high quality. How can I make it better quality? It doesn't sound like when I press Enter in Flash CS5.
View 2 Replies
Jul 16, 2010
Code: Select allimport com.greensock.*;
import com.greensock.easing.*;
TweenLite.to(mc, 2, {volume:0});
i have classes, but only one thing, how to make sound mc.
View 1 Replies
Feb 3, 2012
I am making a platformer game, and I have money I pickup. How do I have the money make a sound when I pick it up? I am using flash 8
View 1 Replies
Jan 23, 2007
this is my code for photogallery.there will be 61 images loaded in this array.how can i make an AUTO button which will make a slideshow,showing all the images in array?
arrayrow = new Array()
arrayrow=[
["00.jpg","0","sajkad","hjsgadhj"],[code].....
View 5 Replies
Nov 22, 2009
Im have an flv playing on my stage. I want to make a mute button for the video that can instantly make the volume 0 or 100 depending on what it is.So i have tried using this code:
ActionScript Code:
m.onPress = function() {
[code]........However, it doesn't seem to work.
View 0 Replies
Jul 7, 2009
I am trying to make a sound spectrum that uses a circle.I have finished the easy part and am trying to add a blur filter to it.I followed a tutorial, except only the bottom right quarter of the circle will blur.I've tried messing with it but I've gotten no luck.Here's the code.
Code:
package spectrums.tutorial
{
import flash.display.*;[code]..........
View 1 Replies
Jun 3, 2010
Im an aspiring flash game developer struggling with a bit of code in my upcoming game, I want to play a sound(A "ding") everytime the main character touches a cookie on stage. The main character follows the mouse cursor, and the cookies fall down from the sky.
I have scripted the cookies main class, with this function(which works fine)
private function eFrame(e:Event):void{
Code:
private function eFrame(e:Event):void{
this.y += 3;//move the bell slowly downwards
if(this.hitTestObject(_root.mcMain)){//if this touches the main character
_root.mainJumping = true;//make him jump
[Code].....
And I was hoping it would go into the library and play the sound bit named "bellSound" but it doesnt do this, instead nothing happends, not even any errors under the "Compiler errors" So no im a bit lost, as I do not know how to make this work, so a sound is played when the main character touches the cookie.
View 3 Replies
Jul 12, 2010
The sound only plays when I hold the mouse button down. I need it to play when I click it. But it has to stop the sound from playing twice import flash.media.SoundMixer; this.addEventListener(MouseEvent.MOUSE_UP,f); function f(e:Event):void{ SoundMixer.stopAll(); } here is a link to my swf file [URL]
View 4 Replies
May 18, 2011
I've made a slide show with three pieces of audio that are set up to play with certain images.So you can imagine when the video is paused but the sound continues playing everything gets a bit messed up.
I have each audio on a different layer and none of them overlap, just fade in/out to one another.[code]...
View 1 Replies
Aug 23, 2011
In case, we are talking about playing cards, and it happens that all the cards, I mean the 3 cards are aces, or tens or kings,and in this situation, I want to display a text or make a sound; The part with the sound or the text is easy for me; I have no problem with that.I know intuitively that I have to make a condition which is the following:
If card1==card2==card3== ace I am going to beep or write something.
As I said, the beeping part, or the writing, I can manage.My problem is the if condition and the card1, card2, card3. Where in the world are they ?Do I have to open the array ? var imageA:Array = ["1.jpg............................10.jpg];Right now, there is a good movie on THIS channel,& believe you me I am making a big sacrifice by trying to stimulate my remaining few neurones.
var imageA:Array = [];
var loader1:Loader=new Loader();
addChild(loader1);[code].....
View 19 Replies