ActionScript 2.0 :: Sound Attachment - Click On The Objects First Before Clicking On The Play Button

Sep 21, 2006

I have been trying to deal with sound attachment. Attached is the source file that i am dealing with(I deleted the sound files because the size is too big): Simply, i have to click on the objects first before clicking on the play button. Each objects i clicked represents a different sound and will be stored in the array. So i will be clicking the objects in sequence and when i click on the play button, the music will play. Now comes the problem with my coding, I was unable to let my music coming out one by one at the time in sequence.

View 10 Replies


Similar Posts:


ActionScript 3.0 :: Play Sound On Click Of A Button?

Sep 11, 2006

I want to play a sound on click of a button. I can do this in AS 2.0

//Action Script 2.0

Code:

snd=new Sound();
snd.attachSound("try");
snd.start();

[Code].....

View 11 Replies

ActionScript 3.0 :: Play More Than Sound When Click Button?

Apr 17, 2011

i want to gotoAndPlay more than one sound Ex: when i click the button i want to play frame label m2 and frame labe m1 sound

playy.addEventListener(MouseEvent.CLICK ,pl);
function pl(event:MouseEvent):void
{
so.gotoAndPlay("m2");
so.gotoAndPlay("m1");
}

the sound play in the same time i want to finsh play frame label m2 then stop then play frame labe m1 and stop.

View 3 Replies

ActionScript 2.0 :: Stop Sound Loop From One Button By Clicking New Button?

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

ActionScript 3.0 :: Sound Only Plays When Clicking On Pause Button

Sep 2, 2009

All my sounds work however, the play button only seems to play my sound when I click on the pause or stop button first! Plus, my stop button acts like a pause button, it doesn't start the song from the beginning once it stops. [code]...

View 3 Replies

CS3 Making A Movie Play When Clicking A Button?

Jun 10, 2009

im making an intereactive map and i have certain areas in the map where you can click and a video pops up so you can view real footage of the area. I just need help making the video pop up like how to import it and whatnot.

View 1 Replies

ActionScript 2.0 :: Play In Sequence On Clicking The Button?

Jan 23, 2010

i followed this script which plays my images randomly. but now i want them to play in sequence on clicking the button. what changes should i made.

random_btn.onRelease=function(){
var picNum:Number;
picNum=Math.ceil(Math.random()*20);
photos.gotoAndStop("img"+picNum);
photos.fader.gotoAndPlay(2);
}

View 4 Replies

Actionscript 3 :: Stop Sound And Video When Clicking A Menu Button To Go To Another Frame?

Mar 28, 2010

I have a problem with my slideshow script. I have embedding a flash video file into my website with this slideshow called monoslideshow, and everything seems to work perfectly. Trouble is, when I am clicking on another menu button that should jump to another frame, it still keeps playing the video and sound while displaying the new menu data.So I will probably need some code that stops the video instantly, when another menu button is clicked. But how do I write it and where do I put it?

Here is my actionscript for the video file to show:

var loaderSlide:Loader = new Loader();
var monoslideshow:Object;
loaderSlide.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
addChild(loaderSlide);

[Code]...

It would be great to get a solution to this problem, otherwise my website will be kinda messy ;)

View 1 Replies

ActionScript 2.0 :: Send The Information In The Form Just By Clicking ENTER Instead Of Click A Button?

Mar 14, 2010

I've this code for a form. Now I also want to put in like gotoAndPlay(1); if success How to do?

Code:
if (success) {
if (statusVars.sent == "success") {
clearForm();
statusMsg.text = "Sent";

I would also like to send the information in the form just by clicking ENTER instead of click a button, today the code look like:

Code:
bttnSend.bttn.onPress = function() {
checkForm();
};

How can I change it so it also check the form if the user click enter?

View 1 Replies

ActionScript 3.0 :: Play A Movie Clip By Clicking A Button

Nov 20, 2010

I have a button on the stage called 'play_btn' and a movieclip called 'movie_mc'. The movieclip has a stop on it's first fame so that it doesn't play on the main timeline. I want to use actionscript to have the movieclip play when the button is clicked.I know i need to do some kind of movie_mc.gotoAndPlay('2') on the button or something like that.

View 1 Replies

ActionScript 2.0 :: Play A Nested Movieclip By Clicking On A Button?

Jul 17, 2008

I am trying to play a nested movieclip by clicking on a button. I have an instance name for the nested moviclip, and this is the code I atatched to the button:

on (release) {
_root.conference.gotoAndStop(35);
}

Nothing happens when I click the button with that code. However, if I take out the instance name, the button will play the frame specified:

on (release) {
_root.gotoAndStop(220);
}

View 2 Replies

Play Music In Flash Player By Clicking Play Button Which Is In The Webpage (outside Flash)

Feb 14, 2012

I want to play the music file in flash player (which is embedded obviously) by clicking the play button which is in the web page (not in flash player).

View 2 Replies

ActionScript 2.0 :: Play A Sound On Click?

Mar 26, 2004

how do i play a sound on press?

View 3 Replies

ActionScript 3.0 :: Making Movie Play Or Pause By Clicking Button

Jul 18, 2011

I'm making a project, So I've got several questions..
-How do I make the Movie play or pause by the click of a keyboard or a mouse button?
-How do I Open another SWF within the SWF (loadMovieNum doesn't work anymore )
And last question is How do I move the "video app" I actionscript'd and make it larger . Here's the code I used to put the "video app".

Code:
var camera:Camera = Camera.getCamera();
camera.setMode(550,400,60,true);
// setMode(videoWidth, videoHeight, video fps, favor area)
// Now attach the webcam stream to a video object.
var video:Video = new Video();
video.attachCamera(camera);
addChild(video);

View 1 Replies

ActionScript 2.0 :: CS3 Movieclip Button - Click To Play, Click To Stop?

Jun 21, 2010

I am building a flash interface and I would like a menu where it is hidden to begin with (just a tab). You click the tab to expand it, and click again to collapse it. I've made a movieclip with animation of the menu opening up and closing, but I can't seem to work out how I'd go about making the movieclip open and close properly.

View 4 Replies

ActionScript 3.0 :: Make Sound Play On Click?

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

ActionScript 2.0 :: Play Sound/stop Sound Button?

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

ActionScript 1/2 :: Sound Objects No Longer Play External Swf?

Nov 17, 2008

I have several flash games and quizzes that I now want to put together as a collection on a CD ROM as a bumper pack to buy. I wasn't sure of the best way to do that but I figured that I can create a flash file with individuals buttons on that when pressed loads that SWF's into the main page and plays which I'll export as a standalone player.

Sound good that's just what I wanted, only problem now is that the sound objects that are in the various games no longer play What do I need to do so that they will play as they do when I play each SWF on their own? (Hopefully without too much re-programming of the original games as there are quite a few)

View 17 Replies

Actionscript 3 :: Make Sound Only Play Once When Objects Touch?

Feb 25, 2011

I have a griddle_mc, bacon_mc, and BaconCooking.wav. I want to play the wav when the bacon is moved onto the griddle. If I move the bacon until it just touches the griddle the wav plays fine, but if I continue to drag the bacon_mc across the griddle the wav becomes loud and distorted, almost like it's playing multiple instances of the wav at the same time.

private function __handleSliceDown($evt:MouseEvent):void {
slice1_mc.startDrag(true);
}

[code].....

View 2 Replies

ActionScript 1/2 :: Click Button To Play And Click To Reverse?

Nov 12, 2009

I have a test button i would like to have play a movie where a graphic expands. Once stopped, I would like to be able to click that same button and have the graphic go backwards. I would prefer to have timeline reverse, rather than lengthen the timeline of the mc because then i have to line up the start and end, and if one changes, i have to remember to change the other.

btn_test.onRelease = function(){  if (_root.adinstance._currentframe != 1) {  while(_root.adinstance._currentframe != 1) {  _root.adinstance.prevFrame();  else {    _root.adinstance.play();  }}

[code].....

View 3 Replies

Professional :: Flash Error 1009 Popup On Clicking Play Button Of Game?

Jun 2, 2011

How to solve this error as it will keep popping out whenever I click on the play button of the game I'm creating.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at index_fla::MainTimeline/frame2()
at flash.display::MovieClip/gotoAndStop()
at index_fla::MainTimeline/clickPlay()

View 5 Replies

ActionScript 2.0 :: Added A Function To Have A Click Sound Play On RollOver?

Jan 24, 2004

should be an easy one, but I tried everything i could think of

I just read this tutorial ::[URL]..Got it to work fine, and even added a function to have a click sound play on rollOver.

The thing is, I can't change the color of the link text on rollOver

View 14 Replies

ActionScript 2.0 :: Play A Sound When A User Mouse Click On Anywhere In The Stage?

Aug 13, 2006

how to play a sound when a user mouse click on anywhere in the stage?

View 1 Replies

ActionScript 2.0 :: On The Mouseclick Rollover Loop To Stop And The Down/click Sound To Play?

Aug 16, 2009

I created a movie clip that I am using as a button. I created the states in the clip (up, down, over) and the graphics work, but the sound is driving me crazy. I have a rollover loop that plays and a special click sound on the down/press. On the mouseclick, I want the rollover loop to stop and the down/click sound to play. Also, a getURL is happening on the release. Basically, everything works, except you can't hear the down/click sound. All sound just stops on the click.THis is AS2. Here's my code on the first frame. In the clip/button itself, I have the states labeled, the sounds placed using the properties and a stop on each keyframe of each state.:

playa.onRollOver = function() {
playa.gotoAndStop("_ovr");
}[code]/.....

View 1 Replies

Professional :: When Press On The Button The Stars Will Be Flying From The Button And The Sound Will Play?

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

ActionScript 3.0 :: Sound Plays When I Click Button

Aug 4, 2010

I have a movie clip with a sound at the beginning of my project, and when I click a button in another scene it starts playing the voiceover from that clip. I don't have the button linked to that clip.

View 2 Replies

Professional :: Stopping Sound Playing On Button Click?

May 3, 2010

I found this code to play sound:

myButton_btn.addEventListener(MouseEvent.CLICK, buttonIsClicked); [code]....

I got it working fine, but was wondering how to program a function for another button to stop stop playing that sound?I tried a function with snd.stop(); but that seems to be incorrect.

View 6 Replies

ActionScript 2.0 :: Stop Movie When Click On Different Sound Button?

Aug 6, 2007

I have a flash animation with three different icons which play individual audios.

In one of the movies called 'bird' that I want to stop, I have in the first frame following code.

Code:
x = new Sound();
x.loadSound("mp3/cocky.mp3", true);
which works fine.

This movie 'bird' is then inside another movie called 'container' , any everything then sits in one scene.

In the movie 'container' I have three buttons which play individual sounds using same 'x.loadSound("...' method.

You first see and hear the animation of the 'bird' and it's sound playing straight away. After a 30 sec sound and the animation stops.

All working so far fine up to this point... But What I need is , when the user clicks on one of the other buttons to play the sound WHILE the 'bird' is still playing, I want to stop the 'bird ' animation.

At the moment it stops the sound of the 'bird' but NOT the 'bird' animation. Naturally If I wait 30 sec 'bird' animation stops and no problems there after. Only if and when user clicks before the 'bird ' animation is the problem.

View 12 Replies

Play A Sound On Button Press?

Aug 11, 2009

OK, say I have a button that does something, like go to the next frame, is there anyway to have it play a simple sound located in the library without looping?

View 8 Replies

ActionScript 3.0 :: Play An MP3 When You Click A Button?

Nov 25, 2010

I want to be able to play a mp3 when the user clicks the button.

I am a true newbie, and I saw another post explaining it, but I didn't get it. I tried but it went to a error 1046! [code]...

View 2 Replies







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