ActionScript 2.0 :: Control Different Sounds Globally?

Apr 16, 2010

I'm trying to control different sound attached in different frame. I want a button to turn on/off different sounds separately and globally. I mean after I've press one button in, let's say, Frame 1, it can turn off/on one sound attached in Frame 2 but another sound is not affected.

Right now, I've create 2 buttons for each sound to turn on/off the sounds sounds by setVolume() but I can work only when I entered that frame and press button in the frame. If I've press the button in Frame 1 and go to Frame 2, it did not take effect.

Here is my code for attaching different sounds in Frame 2:

Code:
infoSound = new Sound(infoSoundMc);
infoSound.attachSound("info");
alertSound = new Sound(alertSoundMc);

[Code]....

Is there any other command to turn on/off sound besides setVolume()?

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Make A Music / Sound Control And FX Sounds Control

Mar 21, 2011

im trying to make a music/sound control and FX sounds control,so i have my FX volume level as a variable(FX_vol) and also the Music/sound volume level as a diffrent variable(M_vol),so i set them as sounds that i can use trough coding:

[Code]...

View 2 Replies

Stop All Sounds For A Flash Control?

May 4, 2009

I need to turn off/on all the sound for a flash animation. The flash control contains a layer named sounds that has 5 sounds associated with it in keyframes at different time. How can I simply turn on/off everything using a symbol button.

View 2 Replies

ActionScript 3.0 :: Control The Volume Of All Sounds In The Movie?

Jan 22, 2009

I need to control the volume of all sounds in the movie even if they were in the timeline so they do not have an instance name,by AS3.0 code?

View 5 Replies

ActionScript 3.0 :: Global Volume Control For All Sounds In A Swf?

Aug 20, 2009

Does anyone know of a way to adjust the volume of all the sounds in a swf? I'm looking to build a volume controller that changes the audio level of the swf.

View 1 Replies

ActionScript 2.0 :: Control - Mute All Sounds In A Whole Scene?

Sep 27, 2002

Is there a way to mute all sounds in a whole scene? I want to have a button that turns off all sounds and stops all sounds from playing until i press the button again. The button is done and there's a "set(gallerysound,1) instruction in it when first pressed, and then it changes to zero the second time around. But now I'm stuck. How do i use this var to control the sounds in other keyframes? (preventing the sounds from playing until gallerysound changes again) ?

View 7 Replies

ActionScript 3.0 :: Control Sounds In A Movie Clip Using Buttons?

Nov 16, 2010

I have five audio clips that need to be played when their corresponding button is clicked, but need to be stopped when the same button is clicked or when another one is clicked and when the user clicks out of the movie clip to get back to the main interface.

So far I've been trying to tinker with this:

var sound1:Sound = new Yield();
var mySoundChannel:SoundChannel;
numberThree.addEventListener(MouseEvent.CLICK, clickThis);

[Code].....

View 3 Replies

ActionScript 2.0 :: Presses Control The Sounds Starts And Plays?

Jun 15, 2005

i have made my sound so that when some presses control the sounds starts and plays until they release it. how would i do this?

View 2 Replies

ActionScript 3.0 :: Control Multiple Sounds In Multiple Timelines

Mar 10, 2009

Here's the setup:

-I have a music score that will be streamed in via actionscript

-I also have multiple short sounds (SFX) in multiple nested MCs

-these SFX sounds are customized using the ide edit interface, so it would be a pain to use actionscript to play each sound

What I need: To have 1 mute button for the music, and 1 mute button for the SFX, both on the root timeline.[code]...

View 7 Replies

ActionScript 2.0 :: Use With Music Is Affecting All Other Sounds - Button Sounds And Background Sound

Apr 16, 2010

I followed the mp3player tutorial (part 3) from [URL] and got it working fine. Only problem is that the setVolume I'm trying to use with my music is affecting all my other sounds - button sounds and background sound. I'm aware of the createEmptyMovieClip/attachSound approach and got it working on my other sounds. But Lee's tutorial-mp3player is using a slight different technique, and so my normal approach doesn't quite work.

[Code]....

View 7 Replies

ActionScript 3.0 :: Synchronize Sounds Perfectly To Do A Kind Of Audio Mixer Using Different Sounds?

Feb 7, 2011

I want to synchronize sounds perfectly to do a kind of Audio Mixer, using different sounds. [URL] does it perfectly, I've been researching and researching and I just don't know how to do it! How does [URL] synchonize audio so perfectly? you can even change sounds and the new ones will come on time! How do I do that? Is it just Action Script? or something else?

View 1 Replies

ActionScript 2.0 :: CS3 Getting Sounds To Start Again After Using Stop All Sounds

Nov 29, 2009

I have a film with 4 scenes in it: Here's a link to the film and as you can see the film does not play the music the second time because of the StopAllSounds function which is probably the wrong code to use. The first scene is just a button with 1 frame, a stop action and a music clip. The second scene is the film. The third scene is the credits fourth scene is a Play again button. I have a Stop all Sounds action on the fourth scene because if I do not use it and I press the Play Again button, the music from the first song keeps playing but also the music from the film starts up again so it starts to play twice. What I want to know is, how do I get the music to stop at the end of the film but start up again once I hit Play Again?

I am using Flash CS3 if that helps and using Actionscript2.

View 2 Replies

ActionScript 3.0 :: Declare A Filter And Use It Globally?

Aug 5, 2009

I have a flash project that involves using glow filters on several mcs all over the site, the problem is, the current way I'm doing it requires me to declare and assign the filter on every MC's container.

Is there a way where I can just declare the glow filter once on the maintime line, and then simply apply the filter on the MCs where needed?

this is what I use for every MC, and it's really tedious and hard to keep track of/change.

Code:
var Glow1:GlowFilter = new GlowFilter();
Glow1.color = 0xFFFFFF;
Glow1.inner = false;

[Code]...

View 2 Replies

ActionScript 3.0 :: Fetching A String Globally

Jun 5, 2011

For examples sake, say I have an 'Icon' class. When you set Icon's 'name' variable, it downloads the image (of the given name) from a server/directory.

The problem however, is that even though the name (of the image) is provided, the name of the server, or even the folder containing the image is not.

Of course, I could explicitly define the full name and location of the file to the class, but if I ever decide to change folder structure I would have to go through and find all references to the folder and change it. It also seems wrong to litter all of my parent classes with arbitrary URL's to feed to the Icon class.

The preference of course would be to 'globally request' the image server/directory on instantiation, but in the world of OOP how is this best achieved?

I was just about to have the Icon class dispatch a bubbling event, letting something at the end of the displayList catch the event/request and feed it the information (a String) it was looking for, but it didn't feel right. It feels like dispatchEvent should only be used to Dispatch Events, not request a string...

Also, I've come up to similar situations where I've needed a similar request structure without being an extension of EventDispatcher (such as just a primitive Object). Is there a best practice for both?

View 9 Replies

Professional :: Globally Import Mx.transitions?

Jan 5, 2010

[URL].. lines a lot in our files to set up AS Tweens. Is there a way to import these globally on one frame of ActionScript instead of having to put it in AS for every time an MC is being tweened?

View 1 Replies

ActionScript 2.0 :: Referencing An Array Value Globally XML?

Mar 2, 2007

I have been trying to get this right for a few days now, but I am stumped. This code runs on the first frame of my movie:

Code:
_global.headingText = new Array();
_global.captionText = new Array();
_global.contentText = new Array();

[Code].....

View 1 Replies

ActionScript 2.0 :: How To Access Variables Globally

Nov 2, 2007

i assigned some variables called charstrength and so on but i want to access these variables globaly as the action is on the first frame with all the variables stated and on the second frame i need to access those variables but it just wont let me.

View 9 Replies

ActionScript 3.0 :: Globally Mute Audio From Javascript?

Oct 19, 2010

I just started developing flash recently and I need to globally mute the audio in an swf by javascript ... I've got the following functions in my AS3 already.

Code:

function mute():void
{
var st:SoundTransform = new SoundTransform(0);
SoundMixer.soundTransform = st;

[code]...

Do I need to use addCallback() somehow to trigger this through javascript?

View 4 Replies

Media Server :: Globally Limit The Bandwidth Of FMS 3.5?

Mar 5, 2010

Is it possible to limit globally the bandwidth usage of FMS 3.5 ? I don't want FMS  to use all the bandwidth available via our ISP.I want my coworkers and other servers to be able to continue using Internet while sending/receiving data from/to FMS. I know it is possible to limit various bandwidths per Applications, but it seems there is no easy way - using the xml config files - to globally limit the server bandwidth.

View 2 Replies

Professional :: Globally Adjust Frame Spacing?

Apr 10, 2010

Is it possible to adjust the frame spacing for all layers?For example, I have my stuff (graphics, text, etc..) spaced at 24 frames. Is there a way to globally adjust everything to 48 frame spacing? or 12 frame spacing?

View 4 Replies

ActionScript 3.0 :: Globally Set TLF Text MouseEnabled To False?

May 31, 2011

I'm wondering if you can globally set TLF Text mouseEnabled to false without having to name every text box individually?

View 1 Replies

Actionscript 3 :: Import Class Globally In Flash CS5?

Dec 11, 2011

I have a project in ActionScript 3, Flash Professional CS5.5, and AIR 3. I have several custom classes that I need to access. Currently, I am successfully accessing via the traditional method:

import trailcrest.core.core;
var Core:core = new core();

However, I came to a realization in my code...this creates a COPY of the class, and doesn't give access to the original. This, of course is a problem - I need one symbol's scripts to modify a variable in the class, and another symbol's scripts access that changed variable. Obviously, right now, that is not occurring.How do I do what I am describing? Should I somehow create a "public var" for the class (though I need instructions on how to do that...I can't use "public var" within stages or symbols)? Is there some way to directly access the class?

View 4 Replies

ActionScript 2.0 :: How To Format Dynamic TextFields Globally

Sep 13, 2009

In my project, several textField mclips are created dynamically. These mclips pull their content from an XML from.

The text is formatting partially using TextFormat, but I have been unsuccessful setting the font family.

I think this is because the content is dynamic and called from the XML.

In any case, I then tried to set the font family using mx.styles, but also with no luck:

import mx.styles.CSSStyleDeclaration;
var text_style:Object = new CSSStyleDeclaration();
_global.styles.myStyle = text_style;

[Code].....

View 3 Replies

ActionScript 2.0 :: My Global Variables Are Not Behaving Globally

Feb 4, 2010

I have defined Variables at the start of my script, with _root, to make them valid globally.

Then, in several functions and IF loops, I change the values of these variables, again referencing them with _root.

Then at the end of my script, I want to collect these global variables and send them to a PHP file to late store them in a db.

The problem is that at the end of my script, the variables do not contain any data, I used trace() to test this.

They only seem to contain values inside the IF loops which would mean they are behaving as local variables only?

I also tried replacing _root with _global but got the same results.

I have over 1000 lines of code at the moment so I will only post a snippet here of the general method I used, perhaps some experienced users will spot what I am doing wrong[code]...

View 5 Replies

ActionScript 3.0 :: Globally Seach All Files In A Project?

Aug 7, 2010

I recently inherited a couple projects with half a dozen or more custom classes each. Is there a way to search across all .AS files in a project at once? It is a real drag to open and search each file one at a time.

View 3 Replies

ActionScript 3.0 :: Remove All Breakpoints In All The Code Globally?

Sep 29, 2010

I'm using CS4 and is there a way to remove all breakpoints in all the actionscript code globally. I can only remove them by going to each layer's as code.

View 0 Replies

ActionScript 3.0 :: Knowing When An Object Moved Globally?

May 5, 2011

I saw this question a few times here and there but it never had a satisfying answer... It may be that there really is no elegant way to solve this (Polling for change in ENTER_FRAME is really bad!) but I've got to ask one last time.

I'm a Flex developer but it doesn't really matter in this case.

I would like to know when an object's global x/y was modified (or its transform's concatenated matrix's tx/ty, same thing), maybe because an indirect parent somewhere moved, etc.In particular, I have the object's gran gran gran parent which gets its scrollrect changed.

View 3 Replies

ActionScript 3.0 :: Possible To Globally Set TLF Text MouseEnabled To False?

May 31, 2011

I'm wondering if you can globally set TLF Text mouseEnabled to false without having to name every text box individually?

View 4 Replies

ActionScript 2.0 :: Attach A Sound To OnRelease Globally?

Apr 7, 2004

Is there a way to attach a sound to onRelease globally?

View 7 Replies

Actionscript 3 :: Declare Variables Globally Or Within A Function Only When They Are Needed?

Jul 14, 2010

I am working with URLLoader and URLRequest in this case.

I have two buttons. One listens for the mouse click event and then runs the following function (less code not applicable to this question):

function loadURL (e:MouseEvent):void {
....
var myRequest:URLRequest=new URLRequest("*URL*");
myRequest.method=URLRequestMethod.POST;

[Code]....

The other button, when clicked, calls another function, say resetAll, that then resets the "session" by clearing out all the current variables and canceling anything currently in progress. Within that function I want to call myLoader.close(myRequest); but myLoader is not accessible from within resetAll.

In this case, should I declare var myRequest:URLRequest=new URLRequest("*URL*"); and var myLoader:URLLoader = new URLLoader(); outside of the function even if I do not need them yet?

View 3 Replies







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