ActionScript 3.0 :: Change Volume Using Mouse Position?

Jun 29, 2009

I am trying to create a soundscape of a photograph by making the volume of a sound increase as the cursor moves over a part of the photo which would make that sound. I am only interested in the X axis of the mouse position and know what I want my program to do but im having trouble coding it correctly. [code]...

View 2 Replies


Similar Posts:


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

ActionScript 3.0 :: Sound Volume By Position Mouse?

Jul 24, 2011

Is there any code in as3 that sets the volume by x&y- coordinates of the mouse?So that my sound is in a MC, and how closer my mouse is at the MC, the louder the volume gets?

View 4 Replies

ActionScript 2.0 :: Mouse Position On Stage Dictating Volume Level?

May 30, 2007

i've got a MC named 'enterBtn', i want the volume of 'crowd.wav' to increase when the mouse moves towards 'enterBtn' and decrease when moving away. i don't know if this helps, but the co-ordinates of enterBtn are x =530, y = 344.

[Code]...

View 2 Replies

ActionScript 3.0 :: Change The Position Of The Mouse?

Jun 13, 2011

My question is fairly straight forward: Is there a way to move the position of the mouse?within confines of the stage)I tried changing the value of mouseX/mouseY but it shows the following errors:I:FlashFlash ClassesMazegameMaze.as, Line 98 1178: Attempted access of inaccessible property mouseX through a reference with static type game:Maze.I:FlashFlash ClassesMazegameMaze.as, Line 98 1059: Property is read-only.

View 6 Replies

ActionScript 3.0 :: How To Change Mouse Position

Aug 6, 2011

i wan to change my mouse coordinate to x->0, y ->0, possible?

View 3 Replies

ActionScript 2.0 :: Change The Mouse Position On The Stage?

Jan 21, 2007

Does anyone knows if it is possible to change the mouse position on the stage?

View 1 Replies

IDE :: Change Mc Position When Mouse Stops Moving?

Jun 23, 2009

I've got this: [URL]

and need to add a function which changes position of those three mc's(myMC, myKulicka,myStin) to the center whenever the MouseMove stops. Thx for any advice

Used AS:

_root.onEnterFrame=function(){
if (startMoving==true){
myMC._rotation=_xmouse;

[Code].....

View 1 Replies

ActionScript 3.0 :: When Enter Frame, Mouse Position Change?

Jun 19, 2010

I Want to change where my mouse x and y is when i enter the frame...

View 1 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 :: Change A Objects Diameter Of Rotation Dependant On Position Of Mouse?

Nov 16, 2009

This is for a personal art project, however I have hit a potential (Actionscript) brick wall! I want the diameter of the 'balls' orbit to change dependant on the position of the mouse but keep the point of rotation exactly the middle of the stage at all times. I.e. if the mouse is hovering over the exact center (both X+Y) of the stage then the 'ball' should have a tiny diameter of rotation (but contstantly follows the orbit in clockwise direction) whilst if you move the mouse towards the edge of the stage then the diameter of the orbit of the ball will increase. Here is the AS which controls a blank movieclip;

[Code]...

View 5 Replies

ActionScript 3.0 :: Scrub That Manipulates A MovieClip, But Tracks A Change In Mouse Position From Click To Release?

Oct 25, 2010

The other is a scrub that manipulates a MovieClip, but tracks a change in mouse position from click to release, instead of tracking the changes in position of a slider playhead. But here is the download for that one:(sorry not a link due to not having over 50 posts yet, you will need to copy and paste)I have found plenty of AS1+2 ways of doing this idea, yet just haven't found any solid AS3 versions.I am currently in a class to learn Actionscript and have tried to figure out this problem yet I am just not yet to that level.

View 0 Replies

ActionScript 2.0 :: Change The Claudio Scroller So That It Will Scroll Ease Depending On The Vertical Mouse Position?

Jun 9, 2005

Does anyone know what I can do to change the claudio scroller so that it will scroll ease depending on the vertical mouse position?

View 4 Replies

ActionScript 2.0 :: Mouse X Position To Control Movie Position?

Feb 1, 2006

Basically the x position of the mouse should control the play position of a movie. Do I need something like an event handler (I'm not sure exactly what these do, but I've seen similar scripts that seem to use them).

View 2 Replies

IDE :: Cursor Position Not Mouse Position In Input Text Box

Nov 12, 2009

I have an Input Text area that users can edit and then submit. I need to be able to show, on screen, the cursor's current position as they type. I don't need to know where the mouse is but all work-arounds I've found so far can only tell me the mouse position. The font for the text is 'courier' or 'courier new' and the Input Text area is scrollable.

View 8 Replies

ActionScript 2.0 :: Tween From One Position To Mouse Position?

Mar 28, 2010

tween from one position to mouse position

View 1 Replies

ActionScript 1/2 :: Focus On Mouse Position When Zooming Movie Clip Using Mouse Wheel?

Oct 29, 2009

I have a map application that when I use the mouse wheel the map will scale up or scale down. The next thing I want to do is to focus on the mouse pointer while zooming on the part of the map.

I have this code...

function focusMousePosition(){    onMouseMove = function (){        Stage.width = _root._xmouse;        Stage.height = _root._ymouse;        updateAfterEvent();    }}
var mouseWheelListener = new Object();var wheelNum:Number;
mouseWheelListener.onMouseWheel = function(wheelNum){    focusMousePosition();    if (wheelNum > 0){        map._xscale *= 0.9;        map._yscale *= 0.9;    }else{        map._xscale *= 1.1;        map._yscale *= 1.1;    }}Mouse.addListener(mouseWheelListener);

View 3 Replies

ActionScript 2.0 :: Make A Volume Change?

Jan 7, 2011

Im trying to make a volume changer but im not succeding.

And the actions I have are:

var som_fundo:Sound=new Sound(this);
som_fundo.attachSound("som_fundo");
som_fundo.start();

[Code]....

View 1 Replies

ActionScript 3.0 :: How To Change Sound Volume

May 17, 2011

How do you change sound volume?
Code:
Select allimport flash.events.Event;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
import flash.events.MouseEvent;
[Code] .....

View 2 Replies

ActionScript 3.0 :: Zoom To Mouse Position Using Mouse Wheel?

Mar 9, 2010

Code:

addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheel);
function mouseWheel(event:MouseEvent) {
Map.scaleX = Map.scaleX + event.delta*.01;
Map.scaleY = Map.scaleX;
}

The problem with this code is that it scales from the registration point (0,0). Due to the other transformations I'm doing to this image at various times, it isn't possible to move the registration point. The image is larger than the stage and the user is able to drag it around. I want the mouse wheel to zoom in on the place the mouse is hovering over (or at a minimum...the center of the "view" they have...aka the stage)I tried doing this:

Code:
internalPoint = new Point(Map.mouseX, Map.mouseY);
externalPoint = new Point(stage.mouseX, stage.mouseY);
var matrix:Matrix = Map.transform.matrix;

[code]....

Which, incidentally, I'm using that whole portion of code to zoom into the state they will be in when they use the mouse wheel.

View 1 Replies

ActionScript 3.0 :: Change Volume Of A Sound On The Timeline?

May 9, 2009

I have several sounds of same length playing on the Timeline, each playing in loop on their own layer so that they can be syncronised on the same tempo (i did not managed to do this through pure AS3).

Is it possible to manipulate the sounds on this timeline individually via actionscript (ie: add listeners, change volume, read position) ?

View 5 Replies

ActionScript 3.0 :: Change Speaker Output Volume

Aug 22, 2011

Is there any way by which I can change the volume of the Speaker?
 
When I use Microphone class, I can set the mic.gain to set the gain in the microphone, likewise can I change the volume of the speaker?
 
I have seen, some websites allow you to change the decibel gain of the speaker in Flash.

View 4 Replies

ActionScript 3.0 :: Change Volume Using Slider Component

Sep 19, 2011

I am trying to use the slider component (aSlider) to control the volume of mySound which is a class called PlaySound. Created an addEventListener for aSlider with a SlideEvent.CHANGE executing a function called changeVolume. Everything else works but I can't seem to get the slider to control the volume of mySound.

import flash.events.Event;import fl.controls.Slider;import fl.events.SliderEvent;import fl.controls.Label;
var mySound:PlaySound = new PlaySound  ;

[Code].....

View 5 Replies

Actionscript :: Change The Volume Of An EMBEDDED Sound?

Feb 23, 2011

Searching for how to change the volume of sounds, I always get this irritating snd=new Sound(URLRequest), followed by snd.setVolume(val). Oh, fine, but my sound is not an URLRequest, it's an embed.

I've made a lot of random attempts (1) to no avail. How am I supposed to do that instead?

(1) including casting my class to Sound, creating a Sound with the embed class as argument, creating a SoundTransform and setting it to the channel, etc.

View 1 Replies

ActionScript 2.0 :: Change The Volume On Individual Sounds?

May 17, 2007

how to change the volume on individual sounds. I have the sounds linked from the library but when I use the setVolume command in actionscript, it lowers the volume on ALL the sounds and not just the sound I'm trying to target.

View 1 Replies

ActionScript 3.0 :: Record The Current Position Of Any Of The Items Item In Order To Use That Data To Change The Position Of The Item After The User Clicks?

Jan 2, 2010

If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of any of the items item in order to use that data to change the position of the item after the user clicks?

This is what I am doing: I have 11 images that slide accross the screen. The user can click any of them at any time. When he clicks one I am scaling the image so it looks like it is comming forward (z axis) and then the rest of the images are scaled down so it looks like they are going back on z axis. So what I am trying to do is get the current position of the image when the user clicks the image so that I can use that to correctly estimate the scaling and moving of the image to make it look like it scales from the center and not from the top left corner. So if have a variable that gets the current position of the image being clicked I'm thinking I can change its position using something like: x = currentposition + -45;

View 9 Replies

ActionScript 3.0 :: Mp3 File In Main Timeline - Change Its Volume?

Nov 23, 2010

I Have  one Mp3 file in main timeline. how to change volume

View 1 Replies

Flash :: Change The Volume Of A Sound Using Keyboard Input?

Dec 4, 2009

How can I increase/decrease the volume of a Sound on key-press in ActionScript 3.0

View 4 Replies

Flex :: Change The Sound Volume Of A Live Stream?

Apr 20, 2010

I have something like this:

private var myVideo:Video;
public var videoDisplay:UIComponent;
...
videoDisplay.addChild(myVideo);

[Code]....

how can I change the volume of this stream, I would like to bind the volume to a slider

View 2 Replies

Professional :: Volume Control - Change Skin Default Setting?

Feb 18, 2010

Mac OSX 10.4.11 - CS4. I have a supplied video.flv that I have in Flash with a skin control and exported as video.swf and inserted into a GoLive site, all is well apart from the excessive sound. The volume controller is defaulted to max and I would like to reduce the default volume by about 50%. Is this possible to do in Flash before exporting the video.swf.

View 10 Replies







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