ActionScript 3.0 :: Flash As 3.0 Volume Functions Not Working

Feb 17, 2011

This is the code am using to create a mp3 player,everything is fine but the volume controls,not able to mute or increase the volume,kindly tell whats wrong in the code

import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;

[Code]....

View 1 Replies


Similar Posts:


Flash :: Videochat Netstream SoundTransform Not Working For Volume Control?

Jan 3, 2012

I have a video chat application where there can be 6 participants. What I would like to do is give the option to each publisher to control their own stream's volume. The code I have looks like this.

[global]
private var volumeTransform:SoundTransform;
[In the init method where ]
outgoingStream = new NetStream( nc );

[Code]....

A possible solution can be this : Calibrate the slider and set the microphone gain, a gain of zero effectively is mute and a gain of 100 is full volume.

View 1 Replies

Flash :: Volume Slider - Volume Doesn't Change Until Mouse Over?

Nov 21, 2009

I've created a small music player with a sliding volume control. I'm having trouble with the volume. Though it does control volume properly, if I set the initial volume to less than 100%, the volume always starts at 100% until I move my mouse over the player. At that point, the volume changes to whatever the initial volume is set to.Is this a flash bug, or am I missing something? Here is the affected code (code for other buttons/functions omitted for brevity):

var song_initvolume:Number = 100;
slider_1._x = groove_1._x + song_initvolume;
playSong(0,song_play);[code]....

I'd like to be able to set the volume at say 50%, but the above mentioned behavior happens each time.

View 2 Replies

Flash :: Reverse Sound Volume Math For Volume Slider?

Feb 1, 2010

I'm building a video player and am kinda stuck at the volume slider part. It's a YouTube style vertical slider, meaning if the slider is in the top position volume should be 100% and if the slider is dragged to the bottom position sound should be 0. Currently it's doing the opposite of what I want :(

Dragging the slider down will make the sound louder, while dragging up lowers it.

Here is my code below dealing with the volume slider.

[Code]....

The (-4) is an offset value so when you drag it all the way to turn it off, it's 0 and not 4. I need to reverse this somehow, so the traces above will swap... going down will make userVolume = 4 and going up will make it 30.

View 4 Replies

ActionScript 2.0 :: Flash To Php - Functions From GET To POST - Not Working

Jan 20, 2007

The form is inside a flash site. the actionscript on the "submit" button is as follows:

[Code].....

I have been up now for 30 hours trying to figure this out and my wife is complaining that my eyes are getting bloodshot. I've played with every variation of these codes as i could think of. Changed all the variable names, changed functions from GET to POST, removed the HTML to simplify the php... nothing works... what am i missing?

View 1 Replies

ActionScript 3.0 :: Flash Working With Functions In External As File?

Oct 22, 2010

Im trying to understand alittle more about using external files.

In my flash actionscript window i basicly want to access a function that i wish to put in an external .as file ... but i just cant seem to get it..

like:

Code:
myFunction();
in external file

[Code].....

View 4 Replies

ActionScript 3.0 :: Volume Control Not Working

Nov 3, 2009

I am trying to write a very simple mp3 player with a volume control slider. My trace statements show that the value of the mp3 volume changes when the slider is moved but the actual volume does not change. I have attached my fla and here is my code:

ActionScript Code:
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
[Code]...

View 1 Replies

ActionScript 2.0 :: Mp3 Volume Controls Not Working In Loaded Movieclip?

Oct 15, 2010

I've created an Mp3 player with dynamic sound controls. Everything works fine when tested in the swf, but when I load the mp3.swf into a separate movieclip in another swf, the volume control does not work.

I've tried setting the lockroot to true and it still does not work.

Here's the code:

slider_mc.onMouseMove = function() {
myPoint = new Object();
myPoint.x = this._x;
myPoint.y = this._y;

[Code].....

View 9 Replies

ActionScript 3.0 :: Simple Volume Slider That Controls The Master Volume Of The Entire Swf?

Oct 6, 2009

does anyone have an example of a simple volume slider that controls the master volume of the entire swf?

View 1 Replies

ActionScript 3.0 :: Var And Functions Not Working?

Nov 30, 2009

Flash won't let me access my functions or variables. And I can't figure out why. Do I have a syntax error?

package {
import flash.display.MovieClip;
public class Base extends MovieClip {

[code]......

View 4 Replies

ActionScript 2.0 :: Functions Not Working Together

Oct 19, 2004

I have these two functions which both happen on an onEnterFrame event;"basichittest" and "photo". They each work by themselves, but not together.I attached the fla file.I commented out lines 6-10 and line 58.I want the red dot "photodetector" to get brighter as the mirror slides to the right. I also want the beams of light to bounce back and forth when the drag happens.If I uncomment the offending code, the beams no longer bounce, but the dot behaves the way I want.

View 3 Replies

ActionScript 2.0 :: Functions Not Working Together?

Oct 19, 2004

I have these two functions which both happen on an onEnterFrame event;"basichittest" and "photo". They each work by themselves, but not together

I attached the fla file

I commented out lines 6-10 and line 58.

I want the red dot "photodetector" to get brighter as the mirror slides to the right. I also want the beams of light to bounce back and forth when the drag happens.If I uncomment the offending code, the beams no longer bounce, but the dot behaves the way I want.Can I only have one function on enter frame?

View 3 Replies

ActionScript 3.0 :: CS4 - Rollout Functions Not Always Working

Jul 14, 2009

I have these little menu tags which move down when you roll over them. Then, if you click one, it stays down. Then the other menu tags move down when you roll over them, until you click one, at which point the previous tab moves back to original position. (I'm sure that makes little to no sense... so look here: [URL]. Anyway, it works great for the first couple of seconds, then after a while (especially after a click) some of the menu's don't return to their previous position. My fla is attached, but here is my script.

PHP Code:
//import classes
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
import flash.display.MovieClip;
[Code] .....

View 3 Replies

ActionScript 2.0 :: Two Functions Not Working Together OnEnterFrames

Jul 29, 2009

I have two functions that work individually, but not together because they're both onEnterFrame functions for the same mc (which is not possible).

Here's the code from the mc "A" class file:
Code:
function onEnterFrame(){
removeA();
connectT();
}

This works until the next function runs...
function removeA(){
if (this._x < 500){
removeMovieClip(this);
}} var strandID:Number
function connectT() {
[Code] .....

Explanation of code: mc "A" hits "strandT" and the two move together across the screen. Mc "A" needs to disappear when it hits x = 500.

View 2 Replies

ActionScript 2.0 :: Working With Two OnEnterFrame Functions?

Nov 5, 2011

How can I combine these two functions without any of them failing or interrupting each other.

[Code]...

View 6 Replies

ActionScript 3.0 :: Nested Functions Not Working?

Mar 14, 2012

I initially posted this in the AS3 NEWBY forum but I think it probably belongs here. On stage I have 5 boxes, the letter A and two buttons labelled button1 and button2. The letter A is also defined as a button labelled AA_btn. When I click on button1 I want a condition to be set so that if the letter A is clicked, boxes 2 and 4 will disappear. Conversly if I click on button2 I want boxes 1, 3 and 5 to disappear. To do this I have nested the letter A and B functions under the button1 and button2 functions.

I also have a reset button which resets the display of all five boxes back to their original display.Everything works fine when I press Button1 to set the first scenario. When I then click on the letter A boxes 2 and 4 disappear. (perfect). Everything also seems to work when I press the reset button, ie: all five boxes reappear.

[Code]...

View 2 Replies

ActionScript 1/2 :: KeyPress Functions Not Working On PC?

Jun 21, 2010

I'm having a problem with PC applications. Notably, the keypress command no longer working when my app is fullscreen. It works just fine on Mac, but bugs out and doesnt recognize and of my KeyPress actions when fullscreen. When its not fullscreen, it works. I dont know what to do, as i need my apps to play fullscreen on both pc and mac.

View 1 Replies

Actionscript 2.0 :: OnRelease Functions Not Working

Oct 12, 2010

I have a serious situation regarding the onRelease Funciton not working properly.I have a FVLplayback componant inside a flash project inside a movie clip. Inside that movie clip I have two layers, One for actionscript and and the other for the actual component which contains instance name of 'myPlayer' (without quotes)[code]That cameraRoll is the instance name of another movie clip I have located in the movie clip as shown in path above. Inside that movie I have rollover, Rollout effects. The actionscipt is in an invisible button right on top of the objects. The actionscript is:[code]The objective: the movieclip to carry out the rollover Rollout effect and to have the function that will start the video.The Problem: When I run the flash project, it does the effect but won't start the video. If i move things around, I can have the video start playing but then the button won't do the rollOver, RollOut effects.

-the path to the video component:-root.menu.video

-the path to the movie clip taht contains the timeframes for rollOver/rollOut effects )which contains invisible button on top of everything. root. menu.cameraRoll

View 1 Replies

ActionScript 2.0 :: Button Functions Not Working?

Sep 14, 2006

i have a lil problem with making button functions to work on a mc within a mc...i have this on my outer mc:

Code:
onClipEvent (enterFrame) {
this.onRollOver = function() {

[code].....

View 6 Replies

ActionScript 3.0 :: Button Functions Not Working Properly?

Oct 17, 2010

I'm putting together a pretty basic website/portfolio. The buttons/code that go from page to page work great. The code I'm using to access larger images from thumbnails is basically the same, however it's not working.I have the site setup so that each larger image is it's own separate page, so basically the thumbnails act as buttons to access a specifically labeled page. Ex- Thumbnail/button "Character1_btn" goes to the page labeled as "Character1" to display the larger image. I hope this makes sense.Below is the code I'm using. As I said- all functions but the character1 function are working properly.. I really need the character 1 function to work.Quote:

stop ();
home_btn.addEventListener(MouseEvent.CLICK,playhom e);
function playhome(event:MouseEvent):void{

[code].....

View 2 Replies

ActionScript 2.0 :: Assigning Functions To Buttons = Not Working

May 20, 2008

here's the essence of what i'm doing:

[Code]....

View 9 Replies

Actionscript 3 :: Volume Controls - Volume On Or Off Through The Games?

Apr 12, 2012

I've got a serious of games which in turn load off a main main swf.I have mute and unmute buttons on the main menu and the same buttons in each game.When I unload/load a game I want the volume to stay as it is so they player doesn't have to keep turning the volume off. AudioOff is the button shown when the volume is off and AudioOn is the button shown when the volume is on.The code I've got now keeps the volume on or off through the games but the buttons aren't showing up correct with this code..

if (SoundVolume.volume == 1)
{
AudioOn.visible = false;[code].....

View 2 Replies

ActionScript 2.0 :: Volume Slides But No Volume Change?

Sep 10, 2011

I converted the slider bar and slider button to buttons. Then, I made the slider button into a movie clip.

Here is the code I placed while slider button was a button:

Code:
on (press) {
startDrag(this, false, left, top, right, bottom);
}

[Code]....

It seems right to me but I don't know. The movie button slides down the slider bar but it just doesn't affect the volume. Going to try to attach my FLA to offer better insight. Just tried to upload it and no matter if it's FLA or zipped FLA, it says it failed.

View 1 Replies

ActionScript 3.0 :: Nested Functions And Tween Classes Not Working?

Feb 18, 2009

For some reason I can't get this nested set of functions to work, it executes the first tween and the tween invoked after motion of the first is finished but it doesn't ever get to the third!

ActionScript Code:
var t1:Tween=new Tween(p1,"rotationY",Strong.easeOut,90,0,50,false);
var t1x:Tween=new Tween(p1,"x",Strong.easeOut,-900,0,50,false);
t1.addEventListener(TweenEvent.MOTION_FINISH,onMotionFinished);

[Code].....

View 3 Replies

ActionScript 2.0 :: LoadClip Button Functions Stopped Working

Oct 23, 2008

created a .swf that continously scrolls with a pause and play button with only actionscript. The file was too large so I created a preloader in a seperate file loading the .swf with loadClip, but the buttons on the .swf stopped working! What do I need to do to get the buttons working again? I'm completely baffled.

[Code]...

View 1 Replies

ActionScript 3.0 :: Functions Aren't Working - How To Make It Work

Jun 25, 2009

I have one function that for some reason, isn't calling the next function. I've been looking over this code all day and I feel like it's probably going to be something really small and stupid but I jsut really need help at this point. The function that isn't working is showUsers().

This is my code:

Code:
import fl.controls.*;
import flash.display.Sprite;
import fl.managers.StyleManager;

[code].....

View 14 Replies

ActionScript 2.0 :: Calling Functions Of Loaded Mcs Inexplicably Not Working?

Feb 15, 2011

i've got this movie clip. I've loaded a swf called "page1.swf" into a holder called "page1MC". This child movie DID have a button in it called "page1_buttonA" in it when I made it, but I can't get it to do anything once I've loaded it. I recently discovered you can trace movie clips, and the trace below is coming up undefined, which might explain why it's not working. Now, can anyone explain WHY it's coming up undefined?

The code for the entirety of this debacle is as follows:

stop();
//Create empty movie clip holder:
this.createEmptyMovieClip("page1MC",1);
page1MC._x =0;

[code]....

I'm a mostly self-taught actionscript hatchet-artist, so there's a HUGE chance I'm missing something obvious because my knowledge is completely unstructured with large gaps where much foundational learning should be.

View 2 Replies

Flash - Add Functions To Playerglobal.swc Or Allow Compiler To Pass Own Functions

Oct 25, 2011

Im adding lot of simple functions to prototypes of top level objects ( Object , Array , String ...) and have 2 questions :

Is possible to add functions to top level's classes in compile-time ?

If not , is there a way to allow this functions to compile ? I dont like to turn off strict mode

ex:

string.removeWhiteSpace();
string.sliceStr("." , "end");
textField.scrollBottom();

this return compile-time error , cause there is no such function , i have to write it in braces :

string["removeWhiteSpace"]();
string["sliceStr"]("." , "end");
textField["scrollBottom"]();

and i like to aviod it )

View 2 Replies

ActionScript 2.0 :: Flash8 - OnRelease Functions Not Working With Attached Button?

Jan 12, 2010

I'm loading an item to the stage and trying to apply a function to it but it doesn't seem to work.

Code:
_root.attachMovie("FullScreenBTN","FullScreenBTN",_root.getNextHighestDepth());
_root.FullScreenBTN.onRelease = function(){
trace("test")
}

When I press the button nothing happens, but when I remove the attach code and just put the button on the stage with the appropriate instance name it does work.

View 5 Replies

IDE :: Raise The Volume To 200% In Flash?

Sep 28, 2009

I have an mp3 that when it loads it doesn't sound loud enough. I tried raising it with the following code, but it didn't work. I can raise the volume to 200% in VLC. How can I raise the volume to 200% in flash???

Code:
import flash.utils.*;
var audioURL:URLRequest = new URLRequest("Irving.mp3");
var exsound:Sound = new Sound(audioURL);

[Code].....

View 6 Replies







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