i am sperimenting with new types of sound implementing in my site (normally i used to import the sound in the flash library and use id from there)
i no longer use the sound in the movie itself but i load an external .mp3 file ..
i wanted to make 2 buttons that put the volume of the sound o 0 and 100 and it works for me but i wondered if i can make the same thing but with a fading effect ..
i want the button to bring the volume of the external file to 0 but not istantly .. it should fade out slovly ..
I'm working on a project in which sound plays an important part. I want to be able to adjust the volume of two sounds independently, �nd have access to the position in the soundfile. The code below plays 2 soundfiles ("L36 Bass.wav" & "L36 Perc.wav"). The sounds are declared as 'new Sound' with qualifiers("L36Bass" and "L36Perc" recpectively) in line 03 & 04 within empty movieclips, to allow individual volume-adjustments. The volume-mix between the 2 is then governed by the x-mouse position (line 10 - 16):
[Code]...
This works just fine (as long as the WAV-files are in the library and the option 'Export for Actionscript' is selected). However, when I try to access the position within a soundfile with the statement SndBass.position; this results in an 'undefined-error'. When I remove the qualifier in line 03, and go for 'SndBass = new Sound()' in stead of 'SndBass = new Sound("L36Bass")', the property SndBass.position is available, but, as expected, the individual volume-control is lost.
i have a flash document that contains two wav file in the library with ID name "soundloop1" and "soundloop2". and there is no other stuff except for the following code on the first frame:
_root.mySound1 = new Sound(mc1); _root.mySound1.attachSound("soundloop1"); _root.mySound1.start(0, 50);[code]....
how come the output is 100(and it sounds like 100 too...pretty loud ) ?? what did i do wrong?
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.
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.
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].....
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.
The problem that I am having is that stopping sounds using a basic "mySound.stop()" command, or using "setVolume" to fade it out instead - causes clipping. I understand that, technically, it is not "clipping" (this is part of the reason why I can't find any forum threads about this). What is happening really is that the sound card is interpreting going from an average dB level to zero makes a square wave, and thus the popping sound. For example, imagine that each dot is a sample in a WAV, and as you can see the straight vertical line occurs when the sound is stopped:BUT, what I am confused about is that this does NOT ALWAYS happen. I find it hard to believe that I am just getting lucky and hitting the stop button exactly at a moment when the wave is at zero (or really close).
I'd like to know where to look for documentation on how to make elements that adjust to the site resolution, or what this technique is called.
Like in here (the floating clip on the left upper corner, there is a menu divided into 2 parts like float:left and :right (like I would make this in css))
[URL]
Basically I'd need a menu always aligned to the bottom-center of the page that won't change the size, but the background always stretched proportionally to the width of the page upon resizing.
I have a textfield 300 width x 300 heigth in the instance.after i loaded the xml into this textfield (xml_txt) , all the content stays within this txtfield. so if i select the text i scroll down..but i dont want this..
is it possible to, after loaded the xml, to adjust the heigth of the textfield to fit in the text, so i dont need to scroll it.?
I am trying to develop a Image Gallery in which I have images of different dimension I don't able to understand how to adjust the size of images using actionscript.
I programmatically created a textfield and I added it to the stage. I placed the textfield close to a dropdown menu that expands when a user hovers over it. Whenever I hover over the drop down menu, some options are hidden because the textfield behaves as if it has a CSS z-index greater than the css z-index of the drop down menu.
I do not have access to the code that created the drop down menu. How do I make it so that my textfield is behind the drop down menu?
Notes the reason I can't programmatically access the dropdown is because I don't have access to the code of the main flash object, whcih is hosted by a 3rd party company. I'm building a plugin. The remote server looks for plugins on my computer and hooks it in.
I have had to adjust the structure in a XML file and so am trying to adjust my AS accordingly so that it can read it.. but i'm having difficulty as my XML knowledge is only basic.
I imported few mp3 files into my fla file Some of them play too soft and I want to increase the volume to make all files the same volume.How can I do it in CS5?
Suppose I have an IFRAME (or even better a Div, if it works?) set at 50% width. And if I put a swf in there, with the swf's size set to expand and fill the area, I'm assuming it will resize accordingly.Then when I resize the window, the frame and the SWF resizes(correct?)THEN, is it possible to place content in the SWF that will adjust accordingly? What I'm trying to do is lay out a series of identically sized thumbnails w/in the swf that will wrap to the area width. Exactly like a list of inline divs, but within the swf. I'd like to figure out a way to make the SWF know its size as it changes and adjust the positioning of contents in the swf fluidly.
I've followed the tutorial on here on how load text from an XML file into a dynamic text box. I'd like to also automatically adjust the height of my text box based on the imported XML text
function loadXML(loaded) { if (loaded) { _root.header = this.firstChild.childNodes[2].childNodes[0].childNodes[0].firstChild.nodeValue; _root.content1 = this.firstChild.childNodes[2].childNodes[0].childNodes[1].firstChild.nodeValue; header.text = _root.header;
I'm starting off with two colors ( 0xa0b1cf, 0x000000 ) and 10 Shapes and I want to blend the colors from 0xa0b1cf to 0x000000 across all 10 Shapes. Is there a way to pragmatically increase the tone of a hex color?
somthing like:
var totalShapes = 10 // number of shapes for (var i:int = 0; i < totalShapes; i++) { var newColor = 0xa0b1cf + black // add back to this color until it is completely black at the end of the loop