ActionScript 3.0 :: SoundMixer.stopAll And Removechild Not Working?
Feb 20, 2012
I am trying to load multiple movies into a single swf. the problem is when I load another swf holding the movie... it keeps playing the sound from that movie even when I change to another one. what I have
ActionScript Code:
import flash.display.SimpleButton;
import flash.display.DisplayObject;
[code]......
View 9 Replies
Similar Posts:
Aug 10, 2010
am building eLearning courses using a Flash-based AS 3.0 course playerI use SoundMixer.stopAll to stop sounds when progressing through the course, pressing buttons etc also call SWFs made in Captivate into my courses. These SWFs have audio in them. But when I progress through these slides (by clicking a next button), the sound from the captivate made slides overlaps (keeps playing). SoundMixer.stopAll does not seem to work for captivate SWFs
View 1 Replies
Feb 19, 2009
I use the AS3.0 stated below to control a simple Flash play/stop button to play/stop a mp3 on a webpage. Since I am using about 15 of those players on one page and a lot of visitors are to lazy or unaware to press 'stop' before clicking 'play' on a next player, a 'stopallsounds' would be great: so, whenever a play-button is clicked all the 'earlier' sounds will stop playing.
So, the buttons seem to work fine but the line "SoundMixer.stopAll();" in the playfunction paragraph is not doing what i want it to do; other/earlier sounds just keep playing.
[Code]...
View 0 Replies
Aug 25, 2010
I've currently got a flash site written in AS3, into which i'm loading an AS2 SWF that plays audio.The AS2 SWF is loaded into a container movieclip at Frame 10, when a specific navigation button is pressed, the playhead advances to this frame, and calls the SWF. When the user navigates away from this frame, SoundMixer.stopAll(); is called to kill the audio from the loaded AS2 SWF.
This works fine inside of Flash however, when deployed to the browser, the audio playing in the loaded AS2 SWF carries on playing.I've tried loading a new blank SWF in it's place to kill the audio, as well as a blank SWF with stopAll(), all of these solutions work within the Flash IDE (CS4) however the audio always persists in the browser.
Code:
var swfLoader:Loader = new Loader();
holderMC.addChild(swfLoader);
var bgURL:URLRequest = new URLRequest("ytPlayer.swf");
[code]....
View 1 Replies
Sep 10, 2009
I'm loading and progressively streaming an F4V Video using pure actionscript code (No playback component used) and after the video begins streaming I place a MUTE button on the stage that when clicked executes the SoundMixer.stopAll(); instruction.
When the movie completes playing I use the following code to monitor the NetStream state changes and place a NEXT button on the stage when the video finishes.
When the video completes there is a NetStream event.info.code issued - "NetStream.Play.Stop"
[Code]...
View 2 Replies
Mar 14, 2009
I'm working on a pretty simple flash application which basically plays a music clip downloaded from a web URL, and makes a stick man dance. I have it all working fine, however, I've used the addChild function on the start button to add the mc onto the stage, however, when I applied the removeChild function to take it off again, I get an error telling me that it hasn't got a caller.Here's the script:[code]I've had my tutor look at it, and she can't work it out either, but I do get the feeling that she's not much wiser on Flash than I am.
View 17 Replies
Oct 25, 2009
here is my script but at the bottom i have a removeChild function which isn't working.
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
[code]....
View 6 Replies
Oct 11, 2011
I'd like to remove objects via removeChild after Tweenlite has finished tweening. But it doesn't really work because my objects are still in the DisplayList. I can't figure out the problem so I would be very happy if someone could help me out with this problem.
Code:
//TweenLite.to(sndText, .5, {alpha:0, onComplete:removeChild, onCompleteParams:[sndText]});//does not really work; still in DisplayList
TweenLite.to(sndText, .5, {alpha:0});
TweenLite.to(musicText, .5, {alpha:0});
[Code]...
View 3 Replies
Nov 2, 2009
I'm working on a simple presentation website in flash that imports swf-banners onto the main page. This works, but I need a backgroundcolor and a border so the banners aren't seethrough. So I create another graphic element that puts itself underneath. All this works, but when I try to write a button to remove the "child" it only removes the imported swf (loader) but it can't remove the box underneath - even if I remove the loader-child completely. I get a "1120: Access of undefined property Kant." error
CODE for buttons & loading the swf:
stop();var Xpos:Number=10;var Ypos:Number=230;var swf:MovieClip;var loader:Loader = new Loader();
[code].....
View 4 Replies
Dec 22, 2009
I'm using CS4/AS3 and am swapping out swf files in a single holder from different buttons. The problem is that the child isn't getting removed when switching from button to button.Here's my code:
var Xpos:Number=0;
var Ypos:Number=150;
var swf:MovieClip;
var loader:Loader=new Loader();
[code]...
View 6 Replies
Jun 2, 2011
I am trying to remove a movieclip from my main timeline but it is not working. you click a button that is in a movieclip that is dynamically added to the stage and it is supposed to remove a movieclip from the main stage. I added a trace to see if it was grabbing the right movieclip and it is. The error message that I am getting is:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
package MarketingQuestionaire
{
import flash.display.MovieClip;
import flash.display.DisplayObject;
[Code]....
View 3 Replies
Nov 2, 2009
I'm working on a simple presentation website in flash that imports swf-banners onto the main page. This works, but I need a backgroundcolor and a border so the banners aren't seethrough. So I create another graphic element that puts itself underneath. All this works, but when I try to write a button to remove the "child" it only removes the imported swf (loader) but it can't remove the box underneath - even if I remove the loader-child completely. I get a "1120: Access of undefined property Kant." error
CODE for buttons & loading the swf:
Code:
stop();
var Xpos:Number=10;
var Ypos:Number=230;
[code]....
Code for "resetting" page:
Code:
removeChild(Kant);
removeChild(loader);
I can't get it to work.
View 2 Replies
Jul 2, 2011
i tryied all 3 methods
removeChild()
removeChildAt()
unloadAndStop();
but still m unable to unload file. Actually m loading a swf file which contains a video. The other video gets loaded but its sound continues. this is the code what i had tried:
[Code]....
View 1 Replies
Nov 7, 2009
I'm new to AS3 and have been making a Snake game. I've come up with a problem with the code (Yes, I have magically created problems trying to program Snake...It's going to be a long day). My problem is, with removeChild...I'm getting strange errors being throw at me. Not only that, but my Movieclip (myFood) is not being removed entirely, only the visuals of it are.
That being said, here is, what I believe to be, the most important chunk of code for this problem, along with the error it gives me.
Code:
/*
* Code for the Snake and whatnot extras.
* Also, Snake and Food are classes.
*/
var myFood:Food = new Food();
stage.addChild(myFood);
function snakeEatFood() {
[Code] .....
View 2 Replies
Mar 2, 2011
I have a simple catching game with objects falling from the top of the screen and when they are caught at the bottom I want a movieclip to appear with +5 to show the point scoring. I have set up a timer to show the mc then to delete it when it finishes. It all works apart from the mc will not disappear once the timer is finished. I have thrown a trace statement in to check that it is firing and that shows up fine. What the hell am I doing wrong? Here is the section of code:
[Code]...
View 2 Replies
May 22, 2007
The problem i've run into is I play the sound (embedded in the timeline so i can sync up animation) in a scene, then move onto another scene using a button. But by the time i get to the 4th or 5th scene all the sounds that I have previously played all play at once. Even if I use the SoundMixer.stopAll(); at every possible chance - it doesn't seem to unload the sounds from memory.
View 6 Replies
Mar 29, 2010
I'm trying to build a conditional statement that will addChild and removeChild at different Timer Delays. Before I go any further, I thought, I should mention that I'm usinig TweenMax to ease the alpha of ease Child from 1 to 0 and back during the process to imitate a fade-in/out.
I'm getting issue with only one line - inside a conditional statement.It's running "OK". The movie runs as I want it, but the remove/addChild transitions are not at the speed I want it at. I am getting an error message in the output, but other than that, the movie runs fine.
stop();
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
[code]....
View 2 Replies
May 21, 2009
Using the example found in the class documentation, you'll notice the bass frequencies are crammed on the low end too much, and the higher frequencies will sometimes register even in the bytearray.position = 0 float. Is this a problem with the design of the computeSpectrum class? Because I can take the same file, put it in another spectrum analyzer and see the bass and treble spread more evenly.[URL]
View 4 Replies
Sep 2, 2010
when do we use SoundChannel and SoundMixer?
View 3 Replies
Jan 6, 2011
I'd like to record live to a server the audio produced by some kind of drum machine made in flash, is it possible with FMS to record audio which is NOT from a Microphone object but from flash' SoundMixer?
View 1 Replies
Mar 31, 2011
I connect to the sound of youtube website, how can I bond SoundMixer.computeSpectrum
[Code]...
View 6 Replies
Oct 29, 2010
I been trying to find this but no luck so far. Is it possible to get different soundmixer values for two different sounds that are playing at the same time?
At the moment it seems to me that the soundmixer takes the combined sound output for analysis, which si not what I need.
View 2 Replies
Jul 8, 2009
For the past couple of weeks I've been wracking my brains over SoundMixer.computeSpectrum(), arguably the coolest method in ActionScript 3. It's the one that spits out the last 256 (or so) audio samples that hit the speakers, with the option of viewing that data in the time domain (waveform) or the frequency domain (Fourier transform). It's great for visualizing music, but its major drawback is that it only operates on global, playing audio, which means you cannot visualize different channels or preprocess the visualization.
Sound.extract(), a new method in Flash Player 10, gives you a Sound object's entire waveform at any time you want; I've managed to line up the waveform in Sound.extract() perfectly with the waveform in SoundMixer.computeSpectrum(), so they are literally neck-in-neck. In this SWF I'm drawing two lines- a blue line, which uses data from SoundMixer.computeSpectrum(), and a red line, which uses data from
[Code]...
View 11 Replies
Aug 2, 2010
Using AS3 here - [URL]. I've got lots of externally loaded videos on this site most of which are XML driven. The "SoundMixer.stopAll();" works as it should, basically. I include it on each destination frame. If you click the "Jump Creative" entry point a video is set to auto-load and play. Now try clicking away on News while the video is loading. If the user clicks away while the video is loading, the audio will kick in after navigating away and after it has loaded.
View 12 Replies
Mar 31, 2011
I managed to run my youtube api and SoundMixer.computeSpectrum.SoundMixer.computeSpectrum are online, positionBar, player.getDuration (), player.getCurrentTime () does not work.Everything is running on localhost.I do not know is the security issue,
View 4 Replies
Jan 4, 2011
i'm wondering if there's a way to record live audio from flash' SoundMixer (NOT from the microphone).
View 1 Replies
Aug 31, 2009
I'm trying to use the code below to show a graphical representation of the sound from externally loaded FLVs, as they play.The code I have is below, can I change this to listen for whatever sounds Flash is playing at the moment and computeSpectrum from tha
Code:
var url:String = "song.mp3";
var request:URLRequest = new URLRequest(url);
[code]......
View 5 Replies
Mar 15, 2011
I need to mute the sound in my flash movie via html (flashVars parameter).My code in timeline is:[code]
View 6 Replies
Dec 19, 2008
I'm running two flash items on one page, both have sound, and the AS3 swf uses computeSpectrum
I'm getting the following error message:
SecurityError: Error #2121: Security sandbox violation:
SoundMixer.computeSpectrum:
http://dev1.kbrcomm.com/OLA/soundSpectrum_rev2.swf
cannot access
http://dev1.kbrcomm.com/OLA/ICE_intro_rev9.swf.
[Code]...
View 5 Replies
Jun 11, 2010
I am trying to develop a sound visualizer and i have developed OO solution but the problem is I get this error:
SecurityError: Error #2121: Security sandbox violation: SoundMixer.computeSpectrum: widget5.swf cannot access . This may be worked around by calling Security.allowDomain.
at flash.media::SoundMixer$/computeSpectrum()
at widget5/onEnterFrame()
Also if I press continue I get other error
Error: Error #2030: End of file was encountered.
at flash.utils::ByteArray/readFloat()
at widget5/onEnterFrame()
View 3 Replies