ActionScript 2.0 :: Script To Adjust The Volume?
May 31, 2004whats the action script to adjust the volumne? cause right now i have
on (release) {_root.currentVolume = _root.currentVolume + 10;}
whats the action script to adjust the volumne? cause right now i have
on (release) {_root.currentVolume = _root.currentVolume + 10;}
Is it possible to get and adjust the iPhones volume from Flash?
View 1 Repliesheeeelo people ! Big Big Problem ! straight to the point i have created new sounds :
[Code]...
And WTF ?! all 3 sound's volume are now 50 !?! it's very so many important to me !
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 would like to ask, how can I adjust the volume for the video playback ? here is the code
Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
video.attachNetStream(ns);
[Code]...
does anyone have an example of a simple volume slider that controls the master volume of the entire swf?
View 1 RepliesI'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].....
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.
adjust ease of slide
View 1 RepliesI'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.
View 3 RepliesI tried the line spacing button, but even setting it at 0 does not get the leading small enough.
View 1 RepliesI have a flash conversion function that I call like this:[code]...
View 1 RepliesI 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.
Sample Code
package {
import flash.system.Capabilities;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
[Code]....
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.
My new XML structure is:
Code:
<?xml version="1.0" encoding="utf-8"?>
<music>
<song>
<thumbPath>thumbs/image1.jpg</thumbPath>
[Code].....
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?
View 1 RepliesHow do I find the desktop resolution of the user viewing my movie so I can adjust the size of the stage accordingly?
View 7 RepliesI made a movieclip and the framerate of my movie is 30.I like to run the mc at half the speed(framerate 15).Is there a script to doing this?
View 1 RepliesSuppose 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.
View 5 RepliesI've been looking to adjust the brightness of a hex color value, but I wasn't able to get it working.
For example I've the hex 0xD97300. How can I DARKEN this color.
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;
[code]....
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
[Code].....
whats the action script to adjust the volumne? cause right now i have
on (release) {
_root.currentVolume = _root.currentVolume + 10;
} and it doesnt work
I made a movieclip and the framerate of my movie is 30.I like to run the mc at half the speed(framerate 15).Is there a script to doing this?
View 1 Replieshow can i adjust brightness with actionscript,is just that im a begginer and only know to adjust alpha, but now I want to adjust the brightness to a graphic that`s inside a movie,
View 1 RepliesI've been through all the tutorials on flash scaling and stage resizing and can't figure this one out. I have an MC in _y proportion to the Stage.height-40, so when resizing the browser I should always be able to see it.
The Problem: I know how to do this; by publishing the movie at 100% width and height - this works fine. But my flash movie is a magazine which is long, and requires scrolling in the browser to see the content.
As soon as I set the movie to publish width/height at 100% I can no longer scroll my flash magazine in the browser.
Is there a way to readjust the MC _y position as the user scrolls up and down; so the MC is always in view. So it'd look similiar to those pesky ads that follows you as you scroll away.
My code:
PHP Code:
Stage.align = "TL";
Stage.scaleMode = "noScale";
resConfig = function(){
[Code]....
What I'm trying to do build an FLV player which will take the size of the FLV movie and dynamically adjust the stage width/height to match the FLV.
View 2 Replies