Volume AS3 problem - help please

I have two audio players in the same framework in my file with the following code:

PLAY/PAUSE BUTTON

BOTAOPLAY.addEventListener (MouseEvent.CLICK, ALEXANDER);

var SOMCANAL:SoundChannel; var PLAY: Boolean = true;

function BOTAO(evt:MouseEvent):void {if (PLAY) {}

var s:Sound = new Sound (new URLRequest("oceano.mp3")); LAND AUDIO

SOMCANAL = s.play (0.9999) ;} else {SOMCANAL.stop ;}) PLAY =! PLAY;

}

OBS:

SOMCANAL = s.play loop (0.9999) audio, repeat audio o 9999 vezes

VOLUME SLIDER

Import fl.events.SliderEvent; import flash.media.SoundTransform;

var VOLUMETRANSFORM: SoundTransform = new SoundTransform (1);

SLIDER.addEventListener (SliderEvent.THUMB_DRAG, VOLUME);

function VOLUME(event: SliderEvent): void {}

VOLUMETRANSFORM.volume = SLIDER.value; SoundMixer.soundTransform = VOLUMETRANSFORM;

}

///

PLAY/PAUSE BUTTON

BOTAOPLAY1.addEventListener (MouseEvent.CLICK, BOTAO1);

var SOMCANAL1:SoundChannel; var PLAY1:Boolean = true;

function BOTAO1(evt:MouseEvent):void {if (PLAY1) {}

var s:Sound = new Sound (new URLRequest("passaros.mp3")); LAND AUDIO

SOMCANAL1 = s.play (0.9999) ;} else {SOMCANAL1.stop ;}) ACTUELLE1 =! ACTUELLE1;

}

VOLUME SLIDER

Import fl.events.SliderEvent; import flash.media.SoundTransform;

var VOLUMETRANSFORM1: SoundTransform = new SoundTransform();

SLIDER1.addEventListener (SliderEvent.THUMB_DRAG, VOLUME1);

function VOLUME1(event: SliderEvent): void {}

VOLUMETRANSFORM1.volume = SLIDER1.value; SoundMixer.soundTransform = VOLUMETRANSFORM1;

}

My idea is that, when users click on the player 1 and player 2 affect the two videos simultaneously. However when the volume increases or in one of the audio players below is applied to both players.

I wish that each volume was independent of each other is to do this?

Hi JhonathanZamarch!

Delete "SoundMixer.soundTransform = VOLUMETRANSFORM;" and "SoundMixer.soundTransform = VOLUMETRANSFORM1;' from your code.

Use SoundChannel.soundTransform = new SoundTransform (volume);

New code:

PLAY/PAUSE BUTTON

BOTAOPLAY.addEventListener (MouseEvent.CLICK, ALEXANDER);

var SOMCANAL:SoundChannel;

var PLAY: Boolean = true;

function BOTAO(evt:MouseEvent):void {}

If {(GAME)

var s:Sound = new Sound (new URLRequest("oceano.mp3")); LAND AUDIO

SOMCANAL s.play = (0,9999);

} else {}

SOMCANAL.stop ();

}

PLAY =! PLAY;

}

OBS:

SOMCANAL = s.play loop (0.9999) audio, repeat audio o 9999 vezes

VOLUME SLIDER

Import fl.events.SliderEvent;

import flash.media.SoundTransform;

var VOLUMETRANSFORM:SoundTransform = new SoundTransform (1);

SLIDER.addEventListener (SliderEvent.THUMB_DRAG, VOLUME);

function VOLUME(event: SliderEvent): void {}

SOMCANAL.soundTransform = new SoundTransform (SLIDER.value);

VOLUMETRANSFORM.volume = SLIDER.value;

SoundMixer.soundTransform = VOLUMETRANSFORM;

}

///

PLAY/PAUSE BUTTON

BOTAOPLAY1.addEventListener (MouseEvent.CLICK, BOTAO1);

var SOMCANAL1:SoundChannel;

var PLAY1:Boolean = true;

function BOTAO1(evt:MouseEvent):void {}

If (actuelle1) {}

var s:Sound = new Sound (new URLRequest("passaros.mp3")); LAND AUDIO

SOMCANAL1 s.play = (0,9999);

} else {}

SOMCANAL1. Stop();

}

ACTUELLE1 =! ACTUELLE1;

}

VOLUME SLIDER

Import fl.events.SliderEvent;

import flash.media.SoundTransform;

var VOLUMETRANSFORM1:SoundTransform = new SoundTransform();

SLIDER1.addEventListener (SliderEvent.THUMB_DRAG, VOLUME1);

function VOLUME1(event: SliderEvent): void {}

SOMCANAL1. SoundTransform = new SoundTransform (SLIDER1.value);

VOLUMETRANSFORM1.volume = SLIDER1.value;

SoundMixer.soundTransform = VOLUMETRANSFORM1;

}

I hope this helps!

Tags: Adobe Animate

Similar Questions

  • The payment change ADOBE info Web page fails - I can't scroll down to save the changes. My subscription is expired and I am dead in the water! I can't find a support customer portal to this problem - HELP PLEASE!

    I can't scroll down to save the changes. My subscription is expired and I am dead in the water! I can't find a support customer portal to this problem - HELP PLEASE!

    catsrock

    Great salvation,

    We are sorry for the inconvenience caused to you!

    I recommend you contact customer service regarding this issue.

    Kind regards

    Rahul

  • Import and copy from one catalog to another has some problems-help please

    Hi people,

    I have two catologs on two different disks. I imported a number of raw images from one to another using the copy. He did also copy xmp files, but most of the images do not appear to have been developed. I did something wrong? Is this a new stage so these images acknowledge the work accomplished since the xmp file?

    Second, the virtual copies have been copied not more as well. They are in the first catalog, but not when I imported and copied.

    Help please while I can still understand what images I imported because they are in every sense, and maybe I need to recreate my steps.

    Lightroom 3 more up-to-date, Windows XP.

    Thank you.

    ~ Bob

    Bob,

    You import or catalog? You need to do the latter.

    If you are importing a catalog, remove the images that you have brought to and use the above menu option.

    HAL

  • AS3 problem if please read and suggest or help maybe?

    untitled.JPG

    How can I do this using split or other codes or average?

    I mean I have create a keyword

    for example my keyword is 'HELLO '.

    so if you type 'HELLO' output will be 'HI '.

    even though I have the output 'HELLO THERE' output will be still "HI" because my key is HELLO

    its for our thesis of the project Please HELP us

    Use the class String indexOf() method.  Find it in the documentation help to become familiar with it.

    If (String (Input.Text). IndexOf("Hello") >-1) {}

    systemResponse = 'hi. '

    }

  • AS1 to AS3 conversion help please

    Hello

    Would someone kindly help me with this conversion please?

    I am completely new to Flash and functional on convert my AS1 site developed in AS3. I think I understand the concept now that we add listeners to what we want him to do when the event occurs. So I have this I understand patiently. From what I understand, I have buttons across the way will listen if they are clicked and if they are clicked it performs a test that says: "if I'm not on this page then go ahead.

    I'm a script kiddy that I admit I then copy paste and go with what works. My compiler errors have been reduced considerably with the release of AS3. I like to learn so if you post code, please explain what he does.

    The final product is www.blackelementpmc.com

    Thanks for the help!

    Symbol 'work' AS1 script
    My attempt at AS3
    Section 2:_root. Link = 1;
    _root.pressed_link = 1;
    var $link = 1;
    var $pressed_link = 1;
    BT3 (button next to the logo LCorp)on {(overview)
    gotoAndPlay ("s1");

    }
    on (deployment, releaseOutside) {}
    gotoAndPlay ("s2");

    }
    on (release) {}
    If {(_root.link <> 4)}
    _root. Link = 4;
    _root. Play();
    _level1.gotoAndPlay ("diss");
    _root.pressed_link = 4;

    }
    }
    function rollHandler(e:MouseEvent):void {}
    If ($link! = 1) myClip.gotoAndPlay ("s1");
    }

    function rollOutHandler(e:MouseEvent):void {}
    If ($link! = 1) myClip.gotoAndPlay ("s2");
    }

    function clickHandler(e:MouseEvent):void {}
    trace ("clicked");
    }

    myClip.addEventListener (MouseEvent.ROLL_OVER, rollOverHandler);
    myClip.addEventListener (MouseEvent.ROLL_OUT, rollOutHandler);
    myClip.addEventListener (MouseEvent.CLICK, clickHandler);

    function clickHandler(e:MouseEvent): void {}
    If ($link! <>4) {}
    $link! = 4 ;
    $link! myclip.gotoAndPlay ();
    myclip.gotoAndPlay ("diss");
    $pressed_link = 4;

    }
    }
    Plot of 95loadMovieNum ("page1.swf", 1);looking for a method
    ControlonClipEvent (load)
    {
    _root.soundstatus = "on";
    _root.mySound = new Sound (_level0);
    _root.mySound2 = new Sound (_level1);
    _root.mySound3 = new Sound (_level2);
    _root.mySound4 = new Sound (_level3);
    _root.mySound5 = new Sound (_level4);
    MaxVolume = 100;
    minvolume = 0;
    }

    onClipEvent (enterFrame)
    {
    if(_root.soundstatus=="on") {stage = 5}

    if(_root.soundstatus=="OFF") {stage =-5}

    MaxVolume += step;

    If (maxvolume > 100) {= ;} 100 maxvolume
    If (maxvolume < 0) {maxvolume = 0 ;}

    _root.mySound.setVolume (MaxVolume);
    _root.mySound2.setVolume (MaxVolume);
    _root.mySound3.setVolume (MaxVolume);
    _root.mySound4.setVolume (MaxVolume);
    _root.mySound5.setVolume (MaxVolume);
    }
    Don't know even how to start with this...

    You can apply unload() to your charger in as3.

    and you use the class loader again to that code preloader.

  • Playlist problems HELP Please!

    Hello! First post here and unfortunately, its about some problems.

    I'm having problems with plalists and don't know how to fix. Okay, I create the playlist in Nero M3U format, encode files

    off a CD to MP3 and then using Wexplore, copy them into the Clip. The playlist is in the Playlist folder and MP3s

    in the folder of songs. OK, it sorta well worked during the first three playlists.  Herer are now the problems:

    1. when I try to play a playlist in the playlist folder, it shows the playlist in a vacuum. The playlist appears however

    in the Albums folder and the first three have played fine from there.

    2. ok, the fourth one that I've added shows in the unknown album for a title folder. He plays very well however songs.

    He appears in the playlist as unknown and 'empty' folder when I try to play from there.

    3. the fifth one I added does not appear in the Albums folder at all (the only place I can play any of the playlists).

    It appears in the playlist folder, but appears as empty when I try to play.

    I used the exact same design and copy for each method and of course make me different results. All the songs

    I copied to see the place of songs and play very well. The playlist feature is not very reliable at this point.

    If anyone has experienced this problem and have a solution, please let me know. I enjoy my video, when it acts right.

    I just properly finish loading all my music and playlists so I can listen to my favorite things when I practice my golf

    Swing on the driving range.

    Thank you people!

    Did last night and got the problem solved using WMP. Thanks for your expert advice :-)!

  • Have lost the coloum on the left was next to the windows mail inbox cannot solve this problem help please

    Have lost the information column on the left side of my page of the Inbox, please help

    SE repair Vista and recovery Forum.

    On the view menu at the top, choose "layout... '. "and make sure that the list of"files"is checked, then the left side displays.

  • AS3 FLVPlayback, help please

    Is there a way to get the FLVPlayback works correctly in full screen, if the stage is set to full screen?

    some information about the file, and I want to get to Genesis:
    The project I'm working on that is 1600 x 1200. On the left side is a menu of navigation with drop-down menus, etc. All MAKE raise a film of 800 x 600 on the right side. So when a sublink is clicked I want just showed at 800 x 600 on the right side of the sequence. Then, if the user wants, they can click the full screen of FLVPlayback to make the video fullscreen. Videos should be full screen, after that the button was clicked.

    What seems to be my problem is that I need the stage to be full screen, no windows or border or whatever it is. Currently, I have
    stage.scaleMode = StageScaleMode.EXACT_FIT;
    stage.displayState = StageDisplayState.FULL_SCREEN;

    If I have the fullScreenTakeOver property FLVPlayback = true; the video loads fullscreen, bad. If I fullScreenTakeOver = false, when the fullscreen btn is clicked on the stage came out in full screen. The only way I can get close to get what I want is to not staged in full screen and in setting the Busters property to true (everything works fine, but the swf file does not whole screen, it is in windowed mode).

    Thanks to all in advance! If I need to explain it better, please let me know.

    I'm not sure you can do what you describe using the full screen of the FLVPlayback component button. If you want your stage of 1600 x 1200 with menu to be full screen, you would need to create a button that calls displayState full screen of the stage as:

    function onClick(event:MouseEvent):void {}
    stage.displayState = "fullScreen";
    }

    Maybe you who already do, but once prepare you the ground for full-screen, the FLVPlayback component button will enter into conflict and rocking in and out of full-screen. I think you need to do your own custom button "fullscreen" for the player who gets the size of the stage and the FLVPlayback instance to this dimension of the scale.

  • satellite boot and recovery disk problem, help please...

    Hello

    Well, here's the question. My satellite is a few years old all of a sudden, she leaves the start. Gets the starting address windows xp mode then hangs and repeats the process. So I thought, well... I just install my recovery discs...

    Well well, thank you for a reason, and his frustration as what... I get an error of bad machine. Don't allow me to install my recovery disks. Call toshiba, they say my warranty has expired have to go pay a service representative... Arrgh...

    This was purchased new and this is the correct machine...
    Anyway... when I'm bad machine, I get:
    Failed installation aborted/a process!
    A:/>_
    I'm assuming, there is something I can type here to recognize my machine... Any ideas? Toshiba was no help. Or... If you have an idea how can I start this thing without recoery disks.

    Thanks in advance...

    Hello
    before anyone can say anything, I would be nice to know what type of laptop you have.
    Cause Toshiba has in the meantime changed the recovery process.

    Good bye

  • File size problem - help please!

    I have an Officejet 6500 E709n series, which I use with Windows 7. I used it for several years very well, now for some reason when I scan a document to PDF, it comes out as a huge file. When I just scan a page, it comes out more 2 meg. It shows as not compressed, but I can't find all the parameters relating to compressingthe files. I need to be ready for the email, so it is a serious problem for me. Can someone let me know what happened? Thank you!

    Try the following steps:

    1. open the Solution Center application.
    2. click on the button of Document Scan.
    3. Select "Document in PDF format. Do not select the ' searchable PDF '.
    4. click on the button 'change settings '.
    5. Select the Type of output as 'black '.
    6. click on the 'Advanced settings', and then select the "output resolution" 200.
    7. click on OK. Click done.

    Now, try to scan and check the size of the file.

  • Internet connection problem help please

    When I try to connect to the Internet it will not and when I click to troubleshoot the convenience store does not open. Also through cmd, I used fig icon and everything saying media disconnected

    You have McAfee?  The problem is only recently emerged?  McAfee has been updated at the same time as the last batch of updates from Windows 7 and it seems to be the cause of this problem for most, if not all, users.

    See the communication from this "criticism" - McAfee

    Some customers may experience a loss of network connectivity and/or errors in McAfee Security Center after a recent update

    You should make the fix McAfee, if necessary.  There are corresponding communications for their enterprise products.

    I got McAfee, but the connection has started working again on its own so I thought I was clear of problems. However, when I checked it says he was doing routine checks the updates in vain when I told it to do a manually. So stick with McAfee you don't follow their procedure of fix would have upgraded my PC at risk by not updated and, as other listings of McAfee said since then, the application did not refer to his database of threats correctly. Actually, I removed and then installed Microsoft Security Essentials rather & my answer IE is faster I knew it [even though I had the Add-ons McAfee disabled for centuries].

    I had to run the removal of McAfee Development tool a few times before and it caused a problem with the license if the PC was not connected to the internet during the abduction. Due cat of McAfee support reset their files in order to allow the relocation-reactivation. Here is their link cat - McAfee - media contains the link to the cat

    - - - - - - - - - - - - -

    If you do not have McAfee then Windows update than kb2705219 can also be a cause as the uninstall that appeared to solve the problem for some users [but I'm not particularly convinced by this]. To uninstall an update - control panel, programs & features, [left side of the window] see installed updates. Wait until the system has finished the research for the list of updates. Select update required, then right click and Uninstall.

  • Driver problem help please

    Im having a problem with my laptop it says that I need to get this driver---> Intel Centrino Advanced-N + WiMAX 6250 and try to do it in the Device Manager but it says failed?

    Intel Driver Update Utility allows you to get the latest drivers for audio, network, other components:

    http://is.GD/jQGR7

  • Adobe Acrobat 2.0 problem - help please!

    I had Adobe Acrobat Standard 2.0 works well for years (and it is quite appropriate for what I need for) until about 2 weeks ago, when it stopped. My OS is Windows 7. I uninstalled the software and reinstalled several times without result. When you create a pdf from a Word (my usual task with Acrobat) document, it starts the process and then reached a point where it freezes, and eventually I have to close the program. The progress window "Adobe PDFMaker" reached a point where it says: "convert to Adobe PDF...". "and then freezes. All advice and help to solve very much appreciated! Thank you, John

    If you have Windows 7 Pro or better you can try to use XP mode (assuming that you can always get it to Download Windows XP Mode from the official Microsoft Download Center ).

    For more information on the installation of Acrobat 7, see: error "Activation of server" unavailable in Adobe CS2, Acrobat 7 and hearing 3

  • Layers problem help please?

    I have a problem with organizing layers:

    I created 3 al layers that have a lot of objects to the breast.

    I accidentally pulled a layer into another that appears at the bottom of a very long list of objects.

    How can I get this back another layer only by selecting and dragging for 5 minutes?

    First of all make new layer where you want this layer to be.

    Select the contents of the layer that you want to move in the layers panel who will select all on layer. Press the x key command to cut the contents of the layer.

    Now select the new layer you created and paste in front or back order or order f b If you have CS5 you will also be able to use paste in place command shift V.

    I think this would be the fastest way

  • MovieClip visibility / invisibility problem, help please.

    Hi, I'm trying start my portfolio with a movieclip invisible and invisible, so that the user can make it visible by placing the cursor on a button again by taking the cursor off it. I have the button and movieclip both on the main timeline and I put the script on its own layer. any help is much appreiated. Here's what I film script until actionscript 2:

    Legal_movieclip. Visible = false;


    Legal_button.onRollOver = function() {}

    Legal_movieclip.visible = true;

    };


    Legal_button.onRollOut = function() {}

    Legal_movieclip.visible = false;

    };

    Yep, that sounds right.  The next step is to see if your buttons are coded correctly in seeing if these called functions.  Try to put a trace inside each function...

    Legal_movieclip._visible = false;

    Legal_button.onRollOver = function() {}

    trace ("rolledover");

    Legal_movieclip._visible = true;

    };

    Legal_button.onRollOut = function() {}

    trace ("rolledout");

    Legal_movieclip._visible = false;

    };

Maybe you are looking for

  • How can I change European keyboard to English characters?

    I recently got an Apple iMac and the keyboard is European.  It's not hit a number of characters as they are shown on the keyboard which is irritating. I examined the means to change... through the language on the system of preferences Safari... but n

  • 8 2 HP WiFi connection

    It seems that I'll have to hit the reset button on my router which is a Cisco.   When it struck the two arrows on the WiFi and then the blue button router, it comes right up. Why he couldn't stand the WiFi connection. Any help appreciated. Thank you

  • Hard drive makes a weird cracking / Satellite A500

    Hello I have a fairly new Toshiba Satellite A500 (2 months) and for about 2 weeks, it is difficult to start making a cracking noise (a kind of click hear you when the player load something)... He had never done before. Many drive hard making the soun

  • Where can I find drivers for my Satellite L750-21F?

    Hi all I have a Toshiba laptop without OS and I want to install my Windows 7 (64 bit) but I can't seem to find the drivers: sAny help or links please? Here his name and code:Satellite L750 - 21FProduct code: PSK30E - 05H00EG4I do not particularly see

  • HP Pavilion touchsmart i5sleekbook

    IBought a photoshop that is located on a disc and because my computer doesn't have a dvd or cd, port I want to know how I can install Windows 8