Actionscript 3.0 :: Function Makes Volume Louder?

Jan 10, 2009

I'm working on an application and have the following button setup:

-a movieclip for the button
-a movieclip to play behind the button on roll over (referenced to by buttonSunArray[x])
-a sound that I'd like to play (starting slightly into the sound) when buttonSunArray[x] gets to frame 14

I've used the attached code used to that end. The problem is: if I quickly pass over a button (before buttonSunArray[] gets to frame 14) and go back and sit on it (until it reaches frame 14), the volume of the soundclip increases. If I pass over the button quickly 5 times and then go back and sit on it, it's extremely loud (increases by a certain amount 5 times, I'd suppose).I've tried a number of things, like adjusting the clip volume when timeHasCome is called, but it didn't help.[code]

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Volume Gets Two Times Louder On Playing Sound

Jan 21, 2011

When I try to play a sound via Actionscript repeatedly, it gets louder when you do it really fast. The crux of the code that did this is pretty simple:

Actionscript Code:
buttonGreen.addEventListener(MouseEvent.MOUSE_OVER, reactionGreen);
private function reactionGreen(e:MouseEvent):void{
blob = new blob_cls() as Sound;
blob.play();
}

I made a .swf that shows what's happening. If you roll your mouse over the button repeatedly, you find the sound getting pretty loud. [URL]. My webpage isn't very stable, so this might be better. The volume seems like it could go up to 2 times louder than it originally is..

View 2 Replies

ActionScript 2.0 :: Variables With Function - Makes A Variable Based On An MC's Name

Nov 23, 2004

I have some code that makes a variable based on an MC's name:

[Code]...

but it doesn't work, yet it traces "_level0.but1menu", and trying the function as this: _level0.but1menu.easeY(100) does work. I've also attached a mock up if you want to see what I mean. al input, this one seems weird to me - but I'm sure there is a completely logical explanation. I've used the same sort of idea to open external swfs with no issue.

View 1 Replies

ActionScript 3.0 :: MouseEvent.CLICK Not Working But Using MOUSE_OVER Makes Function Work?

Aug 27, 2009

The main AS timeline creates the enemy instance and calls them via the timer class. Inside the instance enemy movie clip there is some script to do a basic tween and there are functions to remove the enemy and to declare you've hit the enemy. The problem I'm having is when I try to call my KillEnemy function with a MouseEvent.CLICK (or MOUSE_DOWN, MOUSE_UP) event, it isn't registering, I realised this after testing the same function to listen for a MOUSE_OVER, MOUSE_OUT, it worked perfectly.

Can anyone explain why this is happening? Not just that the mouse seems to be a little delicate, even with the roll over listener called it isn't registering the event unless it hits a specific part of the movie clip enemy, which leads me to believe the movieclip is somehow built incorrectly? But even when testing the game with extreme settings (i.e. leaving the enemies on screen for a long time) the mouse clicks aren't registering still. Something is broken! Here is some of code inside the enemy movie clip, the problem lies on line 11:

[Code]...

View 6 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

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 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

Bug Makes Scripting Impossible?

May 6, 2009

This is sooo anoying! I can't type anything properly! The longer a line gets, the further the blinking line thing intersects with what you typed, and punctuation obstructs the text

View 3 Replies

ActionScript 3.0 :: Url Makes Flash Act Differently?

Mar 23, 2010

Does anyone have an idea as to why this happens?The dropdown menus work fine (they are a flash app)The dropdown menus do not work.I'm unfamiliar with how to make a redirect if they just type the url without the 'www'

View 4 Replies

Loading An External Swf Into A Mc Makes The Mc Disappear?

Jul 4, 2011

I have this script on a specific frame and when this frame is called it should load an external movie into a mc that I have on my stage. The mc is named as holder and thumbURL down there is a vatiable which holds the name of the swf I'm trying to load into the holder.

My problem is that the mc dissappears when I try to load this new swf into it. Could it be something with relative/static paths?

onEnterFrame = function(){
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();

[Code]....

View 1 Replies

Flash :: Flex 4 - What Makes A GC Root

Apr 3, 2010

What are the rules for something to be a GC root in Flash? I'm using the Flash Builder 4 profiler, and I'm finding odd things are labeled as GC roots in the object reference details (e.g., an Image control that is no longer in the display list, nor static).

View 2 Replies

Flash :: Export SWC Makes Big .swc And .swf Files?

Sep 9, 2010

Using Flash CS5, when activating Export SWC in the Flash Publish Settings, I end up with a much bigger file (500 ko) than when the SWC is not activated (around 100 ko).

Why is the SWC 5 times bigger ?

View 2 Replies

Flex :: AS3 :: App That Makes / Exports SWFs

Jan 8, 2011

I want to make an app that allows the user to add their own content (pics, movie clips, songs) and then the app saves/exports the content as a SWF so that the users can use the exported swf wherever they like. Can this be done? What do I need to look into?

View 1 Replies

ActionScript 3.0 :: SharedObject Makes The Swf Slower

Feb 15, 2011

I have made a game which successfully uses SharedObject as a highscore system (if you know SharedObject, you'll know what I mean) But after the first time playing the game, when it loads the highscore using SharedObject, it goes noticablly slower My computer when new only had 1gb ram so is slow as it is. Is it just a speed issue with my computer or is this a regualar occurance?

View 0 Replies

ActionScript 2.0 :: Makes A List Of Nodes From Xml?

Oct 4, 2007

I made a flash program that makes a list of nodes from xml. They go like this 1 2 3 4 5..How can i make them go like 5 4 3 2 1 ?

View 1 Replies

ActionScript 2.0 :: Makes One Color Tween To Another?

Feb 6, 2008

i have a red colored box, and i want it to gradually tween into being green.. is that possible only using actionscript?

View 1 Replies

ActionScript 2.0 :: Mouse Makes Pic Move?

Aug 3, 2003

I am trying to make a flash footer for this forum. A footer is 300 by 60. If the user mouses on the top half of the footer, then my image inside will scroll up. Vice versa for mousing on the bottom half. It aint seem to work. I put the below on the image, which is a movie clip.

Code:
onClipEvent (load) {
//because the footer is 30 pixels high
newHeight = this._height+30;
}

[code]...

View 4 Replies

ActionScript 1/2 :: Text Output Makes NO Sense

Jun 10, 2009

here's my code (I'll explain in a second):

[Code]....

Code: - CA:true - TC:0 - CA:true - 1 - TC:1There's no logic in that! The output proves that both parts of the array are true. And yet, the "if" statement only activates once!

View 8 Replies

3D Tool Makes Jaggy Pixelated Edges?

Aug 3, 2009

I've found using the 3D rotation tool to give rough/jaggy/pixelated edges to my vector clips, even after using:cache as bitmap"stage.quality = StageQuality.BEST;" in Document classIs there a way around this?

View 5 Replies

ActionScript 1/2 :: .onMouseDown Makes All The Screen Clickable

Sep 1, 2009

I've got this really weird problem. I have the following code:

[Code]....

The thing is, after I setup the onMouseDown, Anywhere I click on the screen run that function, not only the listMask movieclip! The movieclip is just a plain rectangle that was drawn by code, nothing special, no hidden graphics. Even if I don't draw anything in the movieclip, the whole screen is still clickable (as well as areas outside the screen, if we maximize the player window). This movieclip was created with .createEmptyMovieClip

View 3 Replies

Professional :: What Makes A Camera Compatible With Flash

Dec 9, 2011

What makes a camera compatible with flash? I have a camera I purchased from IDS Imaging and it shows up in my camera list in as3 with print out the array made from Camera.names. But when I go to use it, it just doesn't show up. I do have a lens on it, and it can see it working when I used the IDS software provided for testing. I've also been able to make it work in c#, but I want to use it for a flash app I'm developing.

View 1 Replies

Flash :: Create A Button That Makes Fullscreen?

Mar 8, 2011

I would like to create a button that makes my flash fullscreen.But this line:

stage.displayState = StageDisplayState.FULL_SCREEN;

does not work. Why?(I'm opening my swf directly in Chrome.)

Edit: There seem to be consensus that I should embed in HTML.

View 3 Replies

AS3 :: Good Library That Makes Objects Detection In It?

Aug 10, 2011

Does anyone knows a good library that makes objects detection in AS3?

Im looking for something similar to detect an hand, like kinectic.

View 2 Replies

Flash :: StageVideo Makes Mouse Appear On A Kiosk

Dec 1, 2011

I'm developing a kiosk in AS3 that utilizes StageVideo (publishing for FP 10.2 on a Mac Mini). It works fine, except as soon as StageVideo is engaged the mouse becomes visible. This is a public kiosk so I need the mouse to stay hidden.

View 1 Replies

ActionScript 3.0 :: Makes Different NetConnections And Loads Data?

Dec 20, 2008

All right, this behavior is throwing me off for some reason.

I've got this small library I'm constructing right now. In it I'm creating an object that is rather robust and is constructed from a bunch of smaller objects. The thing is none of these objects are DisplayObjects of any sort... so event bubbling isn't an option here.

The project consists of a public Class object that can be instantiated and a bunch of internal Classes that make up this public one. One of these internal classes is a "backend" to the server. It basically handles communication with the host and makes different netConnections and loads data and all kinds of other stuff. At certain points it updates the front end of different actions that occurs by a custom event type... lets call it CustomEvent... so that way the public frontend Class can do what it needs with it.

Now some of these events that the backend fires really are useless to the frontend except in that the user of the frontend might want to know about this stuff. So I thought I'll just pass the event through by listening for the event and letting "dispatchEvent" capture it:

[Code]...

View 9 Replies

ActionScript 3.0 :: Timeline Mask Makes Everything Disappear?

Feb 2, 2010

i have some dynamically created symbols populating the stage through external packages. they show up on the swf fine.i add some different symbols to the timeline. everything still shows up fine.i turn one of the above timeline symbols into a mask, and ALL the dynamic symbols disappear on the published swf. I need to have a mask for some of the interaction I want to do.. but i obviously can't have it make everything else disappear! what's going on here?

View 9 Replies

ActionScript 2.0 :: Type That Makes The Mouse Disappear?

Jun 10, 2005

Is there something you type that makes the mouse disappear?

View 2 Replies

ActionScript 2.0 :: Top Score --> Which Makes Timeline Move On?

Apr 1, 2003

I have a drag and drop game, which keeps score. However when the last picece it dropped I want to display a congratulations of some kind how do i do that? Here is the sorce code MX.

View 3 Replies







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