ActionScript 2.0 :: Audio's Playing Status As Variable?
Dec 27, 2009
I have two audio files. I want one to play (inter) when a button is pressed but only if another audio file (magnificent) is currently playing. I have tried using the following...
ActionScript Code:
yellow.onPress = function() {
if (_root.magnificent.playing!=1){
[Code]....
...but it doesnt seem to differeniate whether it is playing or not. The "inter" audio still plays even if the "magnificent" audio isnt.
View 3 Replies
Similar Posts:
May 22, 2011
The stream can be buffering,playing or closed.How can I capture these events while playing?
View 1 Replies
Jul 22, 2009
how I know the status of the NetStream whether it is playing or paused or stopped
View 7 Replies
Aug 31, 2009
I have some animation (programmatic, I'm NOT using keyframed animation in timeline), and some music I want to play in the background. Once the music file reaches the end (about 30 seconds long), I want to trigger the end of the animation functions.I figure I could either use an actionscript timer to trigger the end of the animation or a keyframe with actionscript that is placed on the timeline near the end of the song but these methods assume knowledge about the duration of the wave file. If I changed the framerate or updated the external wave file, these triggers would possibly no longer sync upIs there some sort of event listener or other detection method for an audio file to signal it has finished playing? Or maybe there is a way to get the duration of the audio file to use in the timer
View 3 Replies
Jan 28, 2012
I think it is loading the whole audio first into the swf, but I would like to get confirmation from someone more knowledgible.[code]I want it to stream the audio when the button is clicked only so that 100 of these swf will not slow down a whole webpage from loading.[code]I only start getting concerned when I noticed that on FF and Chrome, the page loads really quick but when I open the page in IE, it takes a very long time for the page to appear.
View 3 Replies
Apr 23, 2011
I am learning AS3 and I try to remake an SimDate game. I have studies the functions and the Steps of the game and now I try to make the Functions myself.
I have 5 Attributes:
Strength
Knowledge
Charm
Health
Dollars
For each of them I have defined a variable. Now I need to make an math function. If I want to raise str:
statusstrenght = statusstrenght + addstr
This code is not the original. My other code is down below. I only wanted to show the process.
addstr == Math.random() *5
I wanted that the variable statusstrenght starts with 10. If I press the train Strenghtbutton the action addstr will be started and updates the statusstr with the new value. That's what I had in mind but I cant define the new value off statusstrenght + addstr. Do I have to add a new variable with newstatusstrenght or can I just overwrite the value of statusstrenght if I press the train strength button ?
Here is the code. The math functions aren't working. It is AS3.
import flash.events.*;
var statusstrenght:Number = 10;
var statusknowledge:Number = 10;
var statuscharme:Number = 10;
var statushealth:uint = 100;
var statusdollar:uint = 100;
[Code] .....
View 2 Replies
May 28, 2009
I'm trying to load a successive series of swf, each containing audio, into a loader. As each ends, it's unloaded and the next one loads. I'm using the following code:
Code:
var ldr:Loader = new Loader();
var c:int = 0;
[code].....
View 2 Replies
May 28, 2009
I'm trying to load a successive series of swf, each containing audio,into a loader.As each ends,it's unloaded and the next one loads.I'm using the following code:
[CODE]var ldr:Loader = new Loader();var c:int = 0;var clips:Array = new Array("dmt1.swf","dmt2.swf","dmt3.swf","dmt4.swf")addChild(ldr);ldr.load(new URLRequest(clips[0]));
addEventListener(Event.ENTER_FRAME, loading);[/CODE]...........
Each swf loads just fine, but the audio from the previously loaded swf start playing again, so there's a layered audio mishmash.
View 1 Replies
Feb 8, 2012
im trying to play an audio file through 2 certain scenes in my project. for some reason i cant manage to do it, only to stream in through the entire project.
View 9 Replies
Oct 22, 2010
I've been trying to play an external sound file in Flash and failing miserably.[code]...
The problem with this code is, I can only run it while it's on a live server (the link is obtained from a MySQL database via XML), so I can't tell if any error when it's being run. Then again, I can't see how the above code can lead to any problems.
View 1 Replies
Jun 23, 2011
Update: With the latest Adobe AIR 3 Beta, Adobe added this functionality to their SDK.
http:[url]....iOS Background Audio Playback Support — Developers can now write multitasking iOS applications that can play audio while in the background, including music or voice chat from a conferencing application.
With the new release of AIR SDK 2.7 and Flash Builder 4.5.1 you can "Take advantage of new features in iOS 4 like multitasking..." (from http:[url].....Searching a bit I found out that this "multitasking" does not include true background process, like playing audio while the app is in the background.I know this is new but does someone knows if it is possible to keep audio playing in the background?
View 3 Replies
Aug 3, 2009
I made a simple audio player following a tutorial on Youtube. It seems pretty good, except that the tutorial just starts and stops the sound file. I need it to be playing and for it to pause and resume.As it stands now, the music does play, but the pause button does nothing.Here is the script:
Code:
var loadSnd:URLRequest = new URLRequest("http://jeffreyworthington.com/intro_music.mp3");
var thisSnd:Sound = new Sound();
[code].....
View 6 Replies
May 21, 2010
I have a big problem that the audio of the external swf keeps on playing on top of other swf after clicking another button.
I have about 22 external swf files that are called up after clicking on their respective button. However, the audio keeps playing on top of the new swf that is selected. It thought the "removeChild(loader);" would work but it doesn't remove the audio.
I don't know if this may be an issue, but along with every swf that plays there are 3-4 .flv videos that are included in the swf. I have included the code.
import flash.display.MovieClip;
var Xpos:Number = 220;
var Ypos:Number = 105;
var swf:MovieClip;
[Code].....
View 6 Replies
Jun 4, 2009
I am using red5server and flash cs3 and as3.0 and windows xp. i am trying to capture audio when user clicks on button start. next i will keep capturing for a maximum of 10 seconds or user clicks on stop button.once the maxtime ie 10 seconds reached or user clicks on stop then capturing will be stopped. my application working till this point.but if he clicks on play button then it should play the captured audio. [code]...
View 2 Replies
Jul 8, 2008
I'm trying to build a simple portfolio website, which displays images and videos. I imported a video, and got it to play when a certain button is pressed. But when I press another button (to go look at an image, for example) the video's audio keeps playing. How do I make the audio stop whenever another button is pressed?
View 2 Replies
Aug 2, 2009
My dillema is that on my site when you load a video on one page then click on another page the audio keeps playing. I've had a look around other topics but nothing seems to work for me. I've put in things like videosname.stop() with no success.
View 25 Replies
Feb 25, 2010
I am new to Flash action script and i have problem with action script code. Even though i comment the mvMyVid.play(); still the audio plays for fraction of second and stops.[code]...
View 1 Replies
Nov 17, 2010
I have a swf loading in another swf that has a video player in it. When I remove the swf from the stage, the swf goes away but the audio from the swf keeps playing. Is there a way to tell that swf to stop playing from the parent swf?
View 7 Replies
Sep 9, 2011
I have a sound control file that works great, however, I cannot seem to get the audio to start playing upon entry. I have tried the using the code:: samplesound.play();and it plays but when you click the play button, the audio repeats and the sound file that started upon entry do not respond to the controls.URL...
View 3 Replies
Nov 13, 2010
so I have 3 swf's that im loading with buttons into the main swf. The thing is that these 3 external swf's have embeded flv's. when switching between the swf's with the buttons, im using vid1loader.unload();the only thing is that while the video switched to the other video like it should, the audio keeps running on any number of videos(swf's) that are loaded. My question is how do you stop the audio when using simple Loader and URLRequest to load the swf's?
View 1 Replies
Jul 10, 2009
I have rather large project that contains several swfs and flvs with audio. The project is published in Captivate (which renders a main swf file). After the preloader screen, a lot of the audio files start playing at once at the beginning of the presentation. I have tried inserting an swf (1st Captivate slide) with AS2.0 command "stopAllSounds". It works as intended and stops all the cacophony. But then, none of my audio plays throughout the 7 minute project. Does anyone know how I can restart the audio?
View 1 Replies
Jun 27, 2011
I have a section of a site that has a voice over when you get to a page. I have a play/pause button that works fine, and plays and pauses the audio voice over. I have about 9 other buttons on this page that all have 'SoundMixer.stopAll();' in order to stop the embedded audio. This works the first time you click a button, but any button after that restarts the embedded audio.
Is there a way to make it so that Flash knows not to restart the embedded audio?
Do I need to make a sound variable and set it to 'false'. I am not sure what to do, or how to do it.
View 8 Replies
Apr 22, 2009
I am new to action script.I am going to control the audio files like media player. How to control the audio files playing
View 1 Replies
May 27, 2009
I was wondering if it is possible to analyze music playing on a user's computer and show visualizations of it using computerSpectrum? Basically, can Flash read the audio playing on a computer or just the user's microphone?
View 6 Replies
Nov 8, 2008
I am bulding a slide show with syncronised audio I have aworking version which will load a series of jpgs names 1.jpg, 2.jpgand a series of mp3s (1.mp3 etc). The problm comes when I wanted toadd play and pause buttons.It works until on the second audio file if I click pause thenpay it goes back to audio file 1.mp3. Can't for the life of me findthe right code
View 1 Replies
May 31, 2009
I deployed a website a couple of days ago which is written entirely in Flash. On one of the pages there is a video which plays in the Flash Player. I have noticed that when I leave the video playing and select a button to take me to another page, the other page comes up but the audio keeps playing from the prior page. Worse yet, if I go back to the page with the Flash Player, it now relaods again and there are two audio tracks. Can someone tell me how this code is solved? There must be some Actionscript 3.0, which I'm using, which kills the player whenever you enter a different page?
View 1 Replies
Nov 12, 2009
Using Flash CS3, Actionscript3.0, Player Version 9.0
My video player plays H.264 videos.
But some of my Quick Time movies are not playing audio. Only video is working.
View 1 Replies
Jan 12, 2010
when a video is playing..and i click a button to play to a different label in the main time line..the video component disappears but the audio keeps playing.. all so the volume component, the slider indicator stays stuck to the stage.. what AS3 is needed..to stop the audio and fix the indicator..
View 5 Replies
Feb 10, 2010
1. I have a swf contains a FLV paly back component playing a movie .I have used flash cs4 import movie tool to create it. Name of the files are >movie1.swf movie2.swf
2. In the main movie I have a movie clip which loads the movie1.swf and it start playing .Now user can move from move1 to movie2 by clicking a button
However when I click to view second movie sound of the first movie is still playing .Even if I click to go back to movie1 another sound will be playing and a big mess.[code]...
View 3 Replies
Feb 23, 2010
I don't use Flash that much so the question may sound simple, but how do I pause audio in a timeline? I have added the audio, play and stop button. When I test it works fine, but I can't figure out how to add the pause button, or the play/pause button.
View 2 Replies