ActionScript 3.0 :: Stoping A BG Sound With An Other Class?

Apr 28, 2011

I got a background sound playing which is codes in a separate class:

Class: screen_Control
public function randonizer_SND():void
{

[code].....

View 8 Replies


Similar Posts:


ActionScript 3.0 :: Stoping Sound Stream?

Oct 20, 2009

i make my first flash homepage this time, and i got a problem with my intro.It takes a lot of time to make this work because its my first projekt.So iďve made a flv file as the movie clip and an mp3 for the sound.And i lode it by Actio Script.Here is my code.

//Intro-Video laden
var IntroConnection:NetConnection = new NetConnection();
var IntroStream:NetStream;

[code]........

View 0 Replies

Professional :: Stoping A Music Track?

Sep 11, 2010

so in Macromedia Flash, how do i stop a music Track in macromedia Flash halfway through when its playing?

View 1 Replies

ActionScript 2.0 :: [CS3] Tween.stop Not Stoping

Jul 11, 2008

Here is a better explanation. I am doing this:

[Code]...

I have a lot of traces because I can't figure out what is going on. When you roll over the menu_hello, it stops the "up" perfectly, and on rollout resumes. but if it is going down, and you rollover, and the trace confirms the down, and the rolling over.... but IT DOESNT STOP.

View 1 Replies

Professional :: Adobe Stoping Working On Flash?

Apr 30, 2010

I heard about this as a growing Rumor....Is there any bit of truth behind that ?.

View 2 Replies

ActionScript 3.0 :: Stoping External Playback Video?

Sep 12, 2010

I have a menu and every time a user clicks a button it takes him to a jey frame where there is a external movie playing. but if he clicks on the menu again it takes him to the other movie but the first movie audio dosen't stop.So here are my two doubts:Is there anyway that I can control my external movie via AS so I can Pause and Play it?

View 2 Replies

ActionScript 3.0 :: Sound Class Type - Cannot Convert C$ To Flash.media.Sound

Oct 25, 2009

I have some sounds in my library. They are all exported and have been given class names like C, D, E etc. I have another class that represents a button. This class stores a reference to one of the Sound in my library. I set the type for this variable to Sound. When I try to set it I get the error: cannot convert C$ to flash.media.Sound I try as Sound, for example key.note = note_array[p] as Sound; The value ends up as null.

View 2 Replies

ActionScript 2.0 :: Stoping Music In The Moment I Open Site?

Jun 9, 2004

Im doing a projector presentation that has music and I want in the moment the client goes into my site (included in the cd) the music of the projector to stop alone, any idea how to make it?

View 1 Replies

ActionScript 3.0 :: Advanced Sound - Missing Properties Not Available In The Sound Class

Apr 23, 2010

I use this class as a base for all my streaming sound. It gives you two missing properties not available in the Sound class: a reliable soundchannel always available for referencing and a latency value indicating how long it took for your last call to play() to actually play the sound. I'll probably post it on my blog when I get the time but here it is:

[Code]...

View 8 Replies

Actionscript 3 :: Sound Class Unloading Sound?

Dec 27, 2011

There must be a simple solution to stop the sound and unload it in as3.

This is not all of my code, but in short I am loading random sounds. I need certian vars to be outside of the function so I can reference them with other functions for a progress bar.

How do I unload a sound so I can load a new one using the same names without getting an error the second time its called?

I have two buttons in this test. A play Sound and a Stop Sound Button.

here is my code:

var TheSound:Sound = new Sound();
var mySoundChannel:SoundChannel = new SoundChannel();
PlayButton.addEventListener(MouseEvent.CLICK, PlaySound);

[Code]......

View 1 Replies

ActionScript 3.0 :: ComputeSpectrum On Sound Class?

Jul 31, 2009

I'm trying to do some beat detection on a sound, but I want other sounds playing at the same time, and I don't want those to be included in the beat detection. Is there anything like SoundMixer.computeSpectrum for individual Sound or SoundChannel instances ?

View 2 Replies

ActionScript 3.0 :: Controlling Sound From A Separate Class

Apr 7, 2009

Is it possible to start and stop a sound file from a separate class? In the first class, "House", I have called the MP3 using the following:

[Code]....

View 1 Replies

ActionScript 3.0 :: Play The Sound From A Document Class

May 12, 2011

I have a .wav sound in my document. It is exported to actionscript with the name clap. I want to play the sound from a document class. Should be an easy 10 points...

View 1 Replies

ActionScript 3.0 :: Play Sound In First Class And Stop In The Other One?

Apr 9, 2010

I am trying to make some sound script for my website, but I need to stop the sound when portfolio's class will open.[URL]

View 7 Replies

ActionScript 3.0 :: Controlling Sound From Separate Class?

Apr 7, 2009

Is it possible to start and stop a sound file from a separate class?In the first class, "House", I have called the MP3 using the following:

Code:
public var mySoundReq:URLRequest = new URLRequest("tune.mp3");
public var mySound:Sound = new Sound();

[code]......

View 1 Replies

ActionScript 3.0 :: Assign A Sound Class, But Found It Was Greyed Out

Apr 18, 2011

I am trying to assign a sound class, but found it was greyed out.

View 2 Replies

Professional :: Sound Class - Page Music Does Not Start

Apr 19, 2011

I have a Flash 8 site that plays music in the background. When I click on one of the menu choices, the timeline jumps to another frame where the selected page is. Once at that page, I want the background music to stop and the page's music to start. Here is what I have:

Attached to frame 1:
var s:Sound=new Sound(); // to initialize a sound instances
then attached to each page keyframe:
stopAllSounds();
s.attachSound("thelinkageidofthesoundthatcorrespondstothispage");
s.start();

When the timeline jumps to the page frame, the background music stops but the page's music doesn't start.

View 5 Replies

Professional :: Sound Class - Use Event Listener - How To Get Functionality?

Jul 5, 2011

i have got all my public vars for sound class but im having trouble on how i would execute them because i normal would use event listener but its OOP lol so how do you get that functionality ?code in star.as file:
 
package {
import flash.display.MovieClip;
public class star extends MovieClip    {[code]......

View 2 Replies

ActionScript 2.0 :: Catching Sound Class Error Message

Nov 19, 2009

I'm trying to catch a Sound class error. The error message that I want to catch is Error opening URL 'file:///E:/blablaFolder/sound.mp3'. So far I'm in this code block:
ActionScript Code:
var error:Error;
try {
_sound.start();
} catch (error:Error) {
trace("error--> "+error.toString());
}

View 1 Replies

ActionScript 3.0 :: Simple Load Sound Within A Class File?

Nov 19, 2009

Does anybody have a simple "load sound" example to show me the proper way to load the sound within a class file?

I tried

ActionScript Code:
import flash.events.*;
import flash.media.*;

[Code].....

Quote:

1067: Implicit coercion of a value of type String to an unrelated type flash.net:URLRequest.

I also tried declaring a "loader" variable, and then setting my sound variable to = my load variable, but that didnt work either ....

View 1 Replies

ActionScript 2.0 :: [FMX] Custom Sound Class Not 'inheriting' OnLoad?

Jun 28, 2004

have read the brilliant OOP for actionscript 1 tutorial from cover to cover and it has me enormouslyMy problem is with a class i wrote called frameSound which extends the Sound object. Well that was the plan but.. it doesn't seem to react to the onLoad event. Here's the code:

Code:
//custom frameSound class constructor.
frameSound = function(){

[code].....

View 4 Replies

ActionScript 3.0 :: Access The Sound () Class From The Youtube Player?

May 19, 2011

how to access the Sound () Class from the youtube player? Worst case scenario, is it possible to ling a new Sound() to a MovieClip?

View 7 Replies

ActionScript 3.0 :: Insert A Sound Inside A Class Of My Game?

Jan 3, 2012

So i am trying to insert a sound inside a class of my game. In the constructor function i declare the variable private var retDamage3:Sound = new Sound();

and in the place i want it to play i put this code retDamage3.load(new URLRequest("sfx/destruirbarra.mp3"));
retDamage3.play(); Except it gives the error:

View 1 Replies

ActionScript 2.0 :: [FMX] Custom Sound Class Not 'inheriting' OnLoad

Jun 28, 2004

My problem is with a class i wrote called frameSound which extends the Sound object. Well that was the plan but.. it doesn't seem to react to the onLoad event. Here's the code:

Code:
//custom frameSound class constructor.
frameSound = function(){
frameSound.count++;

[Code].....

View 4 Replies

ActionScript 3.0 :: Loading Multiple Sound Files With A Single Class?

Nov 11, 2009

I am working on a simple game for kids. The game revolves around the alphabet and it is all voiced. So I have a good number of sound files that I need to call on at any given moment.In AS2 I would just link all of the sound files to variables at run-time and have them ready to play when the interaction dictated it.... with the way "linkage" has changed in AS3... I feel like it would be a bad idea to have over 50 different class files (one for each sound file) so I am looking for a cleaner solution... that and I am guessing that having redundant class files misses the point.I haven't had much luck finding a forum post or tutorial that talks directly about this type of issue but the idea is a little foreign right now so I am sure I have stared directly into the gold mine and not noticed. I am very interested any thoughts or links on the subject.

View 1 Replies

Actionscript :: Flex 4 Sound Class - Detect Sample Rate Of .mp3

Mar 12, 2011

I'm working on an Adobe Air application written in Flex 4 that plays .mp3 audio files on the user's computer. Note: these are are not audio files shipped with the application -- they are .mp3's on the user's computer that they select for playback through the application. The application works fine for .mp3s encoded at 44.1 kHz, but can give unpredictable results if other sample rates are used. I've done plenty of research to know the limitations of the Sound class and how .mp3 will basically be my only option in Flex.

My question is: Is there a way to detect the sample rate of the .mp3 audio in Flex 4 ActionScript? Rather than worry about making the application work well with non-standard sample rates, at this point I'd like to just catch those cases and prevent files with non-44.1 kHz sample rates from loading. To be specific: if a user selects an .mp3 for playback that has been encoded at 48 kHz, for example, I'd like to be able to detect that case and take action preventing the file from loading and then announce to the user that this is not a supported audio file.

View 1 Replies

ActionScript 2.0 :: Load And Play A Sound From Within A CLASS Definition File?

Aug 3, 2009

I need to know how to load and play a sound from within a CLASS definition file. I know the normal way of doing this, but Flash MX rejects that syntax, so there must be some special way of using sounds in a class file.

I need to know how to code for "if the score increases by any value." So, if the score goes from 0 to 1, the sound plays ONCE. If it increases from 1 to 2, the sound plays ONCE again.

View 0 Replies

ActionScript 2.0 :: Control The Volume Of A Movieclip Directly Without Using The Sound Class?

Jun 14, 2010

I was wondering if there is a way to control the volume of a movieclip directly without using the sound class? Or is there a way to control the volume of the entire swf?

View 1 Replies

ActionScript 2.0 :: Background Music Class - Initiate And Attach Sound?

Jul 13, 2011

I'm working on a background music class and found that you cannot use the Sound class in a class file. Specifically, initiating and attaching the sound. Starting, stopping, getting the duration and such seem acceptable (though I haven't tested this yet). I've done a few searches and haven't found any work arounds other than when the class is called, hand it the sound object with the sound already attached, like this:

ActionScript Code:
import bgMusicClass;
var bgSnd:Sound = new Sound(this);
bgSnd.attachSnd("newWave.mp3");
var bgMusic = new bgMusicClass(bgSnd);

View 2 Replies

Actionscript 3 :: Sound Latency - Set It For Any Silence Before The Actual Sound By Calling The Sound

Apr 16, 2011

I am triggering short sounds dynamically from the library for a game (Specifically Air for Android). When the user clicks a button the sound can take up to 600ms to actually play. I have set it for any silence before the actual sound by calling the sound like so:

[Code]...

All return the same results. I know there are threads here that talk about this but none have offered a real solution that I can find. Is there no way to cache the sound or store it in a buffer?

View 1 Replies







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