ActionScript 3.0 :: Target/pause Mc From Sound Toggle Btn?

Nov 29, 2010

I have a movie clip on the main stage which loops an animation of a gramophone. On a separate mc in the layer above I have a working toggle button which plays and pauses a loaded mp3, but does not yet pause the MC animation beneath it. I need to find a way to target/pause/resume the gramophone MC insync with the sound button which is in another movieclip

View 0 Replies


Similar Posts:


Javascript :: SWF Video With Controls (toggle Sound On / Off And Toggle Play / Pause)

Jan 10, 2011

I'm new to flash and just need to do a simple task but I can't manage to get it to work. I'm trying to import a video (flv) into a SWF container and need to AS functions which should be exposed to JS (using liveconnect or anything else). These two function should toggle sound on/off and toggle play/pause. I dont need any user interface or a full featured player, just these two functions.

View 1 Replies

Actionscript 3 :: Flash Play/Pause Sound Toggle Button?

Sep 11, 2010

I've googled and googled but got no where or outdated tutorials. Anyone know how to make it so I can toggle audio with buttons using ActionScript 3 on Flash?

View 2 Replies

ActionScript 2.0 :: Keycode With Play And Pause Toggle

Mar 8, 2009

I am trying to use the letter x to stop and play my movie, I got it to sucessfully stop but I am having trouble restarting it once it is stopped, [code]

View 3 Replies

ActionScript 2.0 :: Make Play/pause Toggle Button?

Aug 13, 2002

Is there an easy way to make a button that toggles from play/pause? Or should I ask, what is the best way.

View 8 Replies

ActionScript 3.0 :: Toggle Play / Pause Button In An FLA Animation?

Oct 27, 2008

I'm having difficulty adding a Play/Pause button to an FLA animation that I've created. The animation is a frame-by-frame clip with motion tweens (rather than an FLV file). I'd like the Play/Pause button to toggle between a PLAY state and a PAUSE state depending on whether the animation is already playing or paused. (It will automatically play when the user begins viewing it, so the first button state should be at PAUSE.)

I've sucessfully created the button (actually as a movie clip with the two states). I've also got the button to pause and play the animation--but I'm unable to get the button (movie clip that is) to actually toggle between the two states. Can anyone tell me a good script to use for this type of control?

View 3 Replies

ActionScript 3.0 :: Adding Play / Pause Toggle Button

Sep 5, 2011

I currently started getting into webdesign and downloaded adobe flash trial as well as dreamweaver trial. How to add the toggle button.

This is the code I am using.
import flash.media.SoundChannel;
import flash.events.MouseEvent;
import flash.events.Event;
var isplaying:Boolean = true;
var lastposition:Number;
[Code] .....

View 10 Replies

Flash - How To Create Toggle Play / Pause Button

Jan 27, 2010

I am new to this flash and I am using as2 for the action script I wanted to know how to create a toggle button so far this is all I have.

on (release) {
play ();
} on (release) {
stop ();
}

I wanted so that when you hit playit would start the animation but showing the pause button and vice versa.

View 1 Replies

Professional :: Adding A Simple Pause/play Toggle Button?

Jun 8, 2010

I have encoded a video to make a .flv for my site, I want to add a simple pause/play toggle button for the flv, does anyone know what code I need to add to a button to get it to work? I don't want to use the default skins and can't seem to find away to get it to pause / play??

View 2 Replies

ActionScript 3.0 :: Flash - Add A Play/pause Btn That Will Pause Both Pictures And Sound?

Dec 16, 2010

I have a timeline of 30 frames, each it's own mc (page01_mc, etc.). In each mc I show a picture or two and hear narration.I have a first, prev and next nav on the main timeline. I need to add a play/pause btn that will pause both pictures and sound. I assume I do that in each mc, but do not know where to find the code.Here is what is in each mc now:

var mySound:Sound = new Sound();
mySound.load(new URLRequest("english/Intro01.mp3"));
mySound.play()

View 1 Replies

ActionScript 3.0 :: Animation Couldnt Control With Play Pause Toggle Button?

Mar 7, 2012

I have multiple movie clip with bg sound.I have used the code AS3 for toggling the animation ( Play & Pause ).Automatically the animation starts and button also togggled on click but couldnt control the animation .I need some solutions like when the intial stage the animation wont start etither the button click to play.After that the flow as it is in action ( ON Click ).

btns.visible = false;
btns.addEventListener(MouseEvent.CLICK,onEl);
dfr.addEventListener(MouseEvent.MOUSE_OVER,onEls);[code].......

View 6 Replies

ActionScript 3.0 :: Animation Couldn’t Control With Play Pause Toggle Button

Mar 8, 2012

I have multiple movie clip with bg sound.I have used the code AS3 for toggling the animation ( Play & Pause )automatically the animation starts and button also toggled on click but couldn't control the animation . I need some solutions like when the initial stage the animation wont start either the button click to play.After that the flow as it is in action ( ON Click ). Kindly anyone guide me to solve it. i'm very new to flash. this is my first project and i have to finish it soon..

[Code]...

View 0 Replies

ActionScript 3.0 :: Make A Simple Flash Mp3 Player With A Play/pause Toggle Button Called Toggle_btn

Jan 14, 2011

I'm trying to make a simple flash mp3 player with a play/pause toggle button called toggle_btn. The button is actually a MovieClip with two buttons inside it: play_btn and pause_btn, which live in different places on the MovieClip's timeline. That all works fine, and when I press the play/pause button for the first time, my music plays as expected.

However, when I press it again to pause, it keeps right on playing. If I push it again, the button gets all glitchy, and doesn't go into its rollover state when it should nor toggle when clicked.

Here's my ActionScript:

Code:
// load the playlist
var getFile:URLLoader = new URLLoader(new URLRequest('songs.xml'));
var numSongs:int = 0; // number of songs in playlist -- we'll set this later

[Code]....

View 3 Replies

ActionScript 2.0 :: Toggle Sound On And Off?

Apr 28, 2008

I have a button, just one button, that I want to be able to use to toggle sound on and off. On the button I have included the following actionscript:

on (release) {
stopAllSounds();
}

Can I add additional script to turn it back on again? Maybe an if statement? The sound is currently being loaded and I cannot really add additional frames to make this work. I have to be able to include the script in one step if possible. Unless a movie with several buttons is the only way to go.

View 1 Replies

ActionScript 3.0 :: Get Sound Toggle (mute And On)?

Feb 20, 2009

I can get my mc button to mute it once, but never turn on again.The audio is a voice over in streaming in the main timeline.

Code:
var soundOn:Boolean = true;
onoff_btn.addEventListener(MouseEvent.CLICK,toggleSound);
onoff_btn.buttonMode = true;

[code]....

View 6 Replies

ActionScript 2.0 :: Sound Toggle Using StopAllSounds()?

Apr 3, 2007

I have created a game where all the main actionscript takes place in one frame.For extra functionality I was going to add a button to toggle on/off sounds, after searching this forums and others Im left confused how to implement this.If i choose to use stopAllSounds() Im aware it only stops the current sounds and will not interfere with sounds about to occur.

Collision detection and random sounds occur within my game on an interval, is there a simple way to turn off all sounds permenantly? The only other id would be a button with a toggle and use multiple IF statements to check status of sound on/off.

View 1 Replies

ActionScript 3.0 :: How To Toggle Sound Off/on Of A Music

May 31, 2011

The user should be able to toggle on or off the sounds button where clicking (on) will turn on the sounds while the button's label will be changed to 'off'Initially the sound is off.

View 4 Replies

ActionScript 2.0 :: Sound Toggle On Template File?

Jan 27, 2009

I have a Template file I am editing that plays music in the background. I want to shut it off when a Video is loaded so I added a stopAllSounds to the button. Works fine; however, I cannot figure out how to turn it back on again, as the template designer placed the sound file into a button rather than creating a sound Object. Was hoping someone could help me figure out how to restore sounds (I have tried adding Frame Labels to his sound movie/button but it returns me to the opening on the animation.

I have posted the file here if anyone would like to help. If no time for that, is there a simple way to output what is happening when I hit the toggle button, so I can copy that and try it?

View 1 Replies

ActionScript 3.0 :: Edit Code For Sound Toggle Button

Aug 19, 2010

I need it so the music plays at start and then the button will pause/stop it, and  then turn into a play graphic which, when pressed, will play it again. I tried editing the code, but I am horrible at programming and of course nothing I tried worked. Please let me know what I have to change to start with music playing, and then have it stop/pause on first press, and alternate "play" and "stop" on subsequent presses. 

[Code]...

View 9 Replies

ActionScript 3.0 :: Got A Toggle Button That Plays Sound When Clicked?

Jan 3, 2010

So I got a toggle button that plays sound when clicked, now I need it to stop playing sound when clicked again.

[Code]...

View 1 Replies

ActionScript 3.0 :: Edit Code For Sound Toggle Button?

Aug 19, 2010

this is the one code that I could make work, but I need it so the music plays at start and then the button will pause/stop it, and then turn into a play graphic which, when pressed, will play it again. I tried editing the code, but I am horrible at programming and of course nothing I tried worked. Please let me know what I have to change to start with music playing, and then have it stop/pause on first press, and alternate "play" and "stop" on subsequent presses.

[My fla has 2 layers, one for this AS, and one for the buttons... within the symbol section, I have two layers, one for the button common BG, and two frames in the button layer, one for play (triangle) and one for stop (square). They are saved as a movie clip.]

[Code]...

View 5 Replies

ActionScript 2.0 :: Mute Toggle Button To Specific Sound Clip

Jun 3, 2011

Creating the necessary code to make a mute/unmute button in ActionScript 2? I would like the "toggle" button to control a specific sound clip only -- not any other sound within my presentation. Basically I have an intro animation of about 20 seconds that has background music to it. I would like to add a mute toggle button that controls only this music clip and not any other sound found within my presentation. Is this possible? I've seen code for "globally" muting or stopping sounds. I need code for just a specific music clip (sound object?).

View 6 Replies

ActionScript 2.0 :: Sound Toggle Conflict With Music Fade In/out Scripts?

Sep 3, 2007

I have a video and background music in one flash file. I need the background music to fade out when the video is playing, and fade back in when the video is paused. Everything works fine until the Music On/Off button is inserted.If you try out the attached FLA, the background music is able to fade out when the video is played and fade in when the video is paused. But once you toggle the Music On/Off button, the background music fade in/fade out doesn't work anymore.

View 2 Replies

ActionScript 2.0 :: Toggle Any Settings When Importing A Sound Clip Into The Library?

Apr 28, 2008

I embeded an mp3 into a movie clip, and the source mp3 is professional quality, yet the embedded clip sounds horrible.

Is there a way to toggle any settings when importing a sound clip into the library?

View 2 Replies

ActionScript 2.0 :: Pause Sound In FMX?

Jan 12, 2004

I have read i trust that I can find the help I need, as many of the members seem very knowledgeable about flash.my problem pertains to Flash MX and pausing .mp3 files I have loaded externally.

View 4 Replies

ActionScript 2.0 :: Pause Button For Many Sound?

May 21, 2010

i am having a problem in creating a plause, play button.The problem now is the button just can pause 1 sound.i have many sound at timeline and it will play 1 by 1.

This is wat i have do at the 1rst but it cant pause all the sound. i try to remove mySound.attachSound("tomato");but it wont work also. the another problem is if i click the play button for 2 times, it will got 2 sound play together.

mySound = new Sound();
mySound.attachSound("sound1");
mySound.start(0,99);

[code]....

View 14 Replies

ActionScript 3.0 :: How To Use Timer To Pause Sound

Jun 7, 2010

I have a couple of buttons that start and stop sound, and I understand how to use a timer so that I can pause sound also. What I want to do, however, is have a sound play as it enters a particular frame and then stop upon entering another frame. As a means towards getting this to work, I experimented with a button that starts a sound on frame 1 and then a second button which stops it on frame 2. This works great as long as both buttons are present on the frame where the AS is introduced (which seems inconvenient as one has to be placed off screen, but whatever...).

When I switch around the name of the functions called upon by the eventListeners though, so stopSound is on frame 1 and startSound is on frame two, it plays when it gets to frame 2, but won't stop when it goes back to 1. I seem to not be getting the principle somehow, because if the functions are play on 1 and stop on 2, I can go back and forth endlessly. How can the order make such a difference? How can I get around this? How can I design an MC to have a sound associated with it so when the playback goes to the frame it is on, it will play, and then how to stop it later on?

Here's the very simple code I'm working with:
stop();
var soundReq:URLRequest = new URLRequest("TheCattleCall.mp3");
var sound:Sound = new Sound();
var soundControl:SoundChannel = new SoundChannel();
sound.load(soundReq);
[Code] .....

View 1 Replies

ActionScript 3.0 :: Pause Sound In External SWF

Oct 11, 2010

I have created a Flash container movie (mainContainer.swf) that cycles through an array loading in several external swf files (animation1.swf, animation2.swf, animation3.swf, etc.). Once the user clicks the next button, the next swf is loaded, and so on...

What I need to be able to do, is to control the sound of the external swf files from the main container. Specifically, I need to be able to pause and play/resume the sound of the external swfs, but not quite sure how to access the external swf's soundChannel from the main container swf. My client recently wanted to add in a "pause" feature, and while I have been able to pause the external swf's animation, I cannot target the external swf's sound - it just continues playing while external animation is paused.

I can successfully pause/resume the sound (song.mp3) if the soundChannel is defined from within the same swf (using code below); however, I cannot seem to figure out how to communicate between the parent and child swf, if the parent is requesting the pause action, and the child swf is the one that loads in the song.

[Code]...

View 4 Replies

ActionScript 3.0 :: Pause And/or Mute A Sound?

Sep 2, 2008

i'm trying to pause and/or mute a sound, with little success.i've found out that something like 'sound.play(pausePosition)' might fail on sound-clips with low sampling-rate.however when i try to mute a sound with a 48000Khz sampling rate it simply won't work.

i've tried both -

soundChannel.SoundTransform.volume = 0
- and -
SoundMixer.SoundTransform.volume = 0

however both won't mute the sound and when traced return 1.

View 1 Replies

Professional :: How To Pause A Sound Clip

Jul 26, 2010

I have the basics down to create a play and stop button and add the actionscript 3 code to play and stop, and this works good, but I really want to be able to pause the clip and resume from the paused spot.Here is the basics...two layers..."AS3" for the scripts, "Buttons" for the buttons.two buttons named "playbtn" and "stopbtn".One frame for eachIn the Scripts frame, the code is:

var loadSnd:URLRequest = new URLRequest("bim1.mp3");var thisSnd:Sound = new Sound();thisSnd.load(loadSnd);
var sndTrans:SoundChannel = new SoundChannel();

[code].....

View 2 Replies







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