Indestructable Volume Bar Needle
I'm using a volume bar from the component library. When I load a .flv it adds the volume bar needle. When I remove my custom player...the volume bar needle remains. It continually adds needles each time the player loads a .flv. The following is what I've tried to get rid of this needle:
my_volume.gotoAndStop("1"); removeMovieClip(this.my_volume.volneedle); this.my_volume.volneedle._visible = false;
None of which has worked. Any help would be appreciated. Thank you.
FlashKit > Flash Help > Flash ActionScript
Posted on: 12-19-2006, 09:24 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Volume Needle Doesn't Go Away
I'm using a volume bar from the component library. When I load a .flv it adds the volume bar needle. When I remove my custom player...the volume bar needle remains. It continually adds needles each time the player loads a .flv. The following is what I've tried to get rid of this needle:
my_volume.gotoAndStop("1");
removeMovieClip(this.my_volume.volneedle);
this.my_volume.volneedle._visible = false;
None of which has worked. Any help would be appreciated. Thank you.
Indestructable Movie Clip
try as i might i can't get this movie clip to remove. i've tried commanding it to remove from the main timeline and nothing happened. now i've attached this code to the clip itself and it still won't go. it works fine for other clips in the movie:
onClipEvent (enterFrame) {
if (this._x<50) {
this.removeMovieClip();
}
if (this._x>750) {
this.removeMovieClip();
}
if (this._y<50) {
this.removeMovieClip();
}
if (this._y>350) {
this.removeMovieClip();
}
}
i've done this lots of time before and it worked fine. there must be something weird about the clip.
[MX] Help With Rotating Needle
hey,
im trying to make a needle in a circle that will point to the buttons that will be placed along the circumferene of the circle, when the mouse rolls over that button.
so, ive made the buttons, and the needle and put the following code on the needle
onClipEvent(enterFrame){
_rotation+=(_root.angle-_rotation)/6;
}
and on each button
on(rollOver){
_root.angle=45;} //or as per the location may be
now, ive gotten the needle to swing but not the exact motion that i want.
what i want it is something like a compass or a speedometer maybe. with the needle rotating being fixed at one point but this rotates like a windshield wiper as in, both the ends are in motion while i only want one to be moving. i hope i'm explaining this properly.
any help will be greatly appreciated, as im in urgent need of this.
thanks
--please excuse me, english is not my mothertongue
Compass Needle
I am VERY new to flash and I am trying to figure out how to create a erffect like a compass needle. I basically have 4 buttons following the outside arch of a compass. when the user rolls over any of these buttons I'd like for the compass needle to point to the active button. Ideally, I'd like this needle to "float" to simulate an actual compass needle instead of instantly pointing to the mouse cursor.
Any help or info would be greatly appreciated.
David Scott
Smooth Needle Preloader
Hello all...
I am trying to make a preloader kind of like a car gauge. I have the needle as a sperate movieclip for the roatation based on how much has been loaded. My problem is that it is very primitive. Basically I am trying to figure out how to control the position of the needle based on how much has been loaded so far. I have seen this done in other SWF's by using a movieclip with 100 frames, each frame being a position out of 100. But I really would like to accomplish this using actionscript and the _rotation property. Here is my code...
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
if(percent < 100){
this.rotate_mc._rotation += 1;
}
text = percent+"%";
this.text_txt.text = text;
Needle Movement Script?
Hi,
Im currently trying to create a type of speedometer thing which reacts via various buttons on the screen.
I done a simple script for the needle to move so many degrees left or right but this simple script doesn't stop the needle from continuing to go to far left or right (min/max on dial). Is there a way of stoping the needle once it has reached say 10 degrees and 120 degrees?
My script is:
bad_btn.onPress = function (){
needle_mc._rotation +=16;
}
good_btn.onPress = function (){
needle_mc._rotation -=16;
}
bad and good buttons determine the left and right
Im also interested in whether once the needle has reached it max point this would trigger of another function etc
Thanks
Spence
Clock Needle Cannot Move Well
hello...
i having a problem here..
the needle of my clock cannot move 360 degrees as well...
here is the attachment of my fla
pls do help me if u guys know how to do..
thankx
Needle Movement Script?
Hi,
Im currently trying to create a type of speedometer thing which reacts via various buttons on the screen.
I done a simple script for the needle to move so many degrees left or right but this simple script doesn't stop the needle from continuing to go to far left or right (min/max on dial). Is there a way of stoping the needle once it has reached say 10 degrees and 120 degrees?
My script is:
bad_btn.onPress = function (){
needle_mc._rotation +=16;
}
good_btn.onPress = function (){
needle_mc._rotation -=16;
}
bad and good buttons determine the left and right
Im also interested in whether once the needle has reached it max point this would trigger of another function etc
Thanks
Spence
Clock Needle Cannot Move Well
hello...
i having a problem here..
the needle of my clock cannot move 360 degrees as well...
here is the attachment of my fla
pls do help me if u guys know how to do..
thankx
Help Needed : Rotating A Needle With Text
I am using Actionscript to generate a speedometer and a needle from two movie clips. The needle is meant to move to a specific value (I use _rotation) and display the value above the needle. The problem that I am having is that I cant find a way to keep the text horizontal as the needle progresses from left to right. The text ends up rotating at the same angle as the needle. I.e. if the speedometer is at the top of the gauge the text is displayed at a 90 degree angle, at the bottom right of the gauge the text is displayed at 180 degrees angle, etc. etc.. Any ideas on how to keep the text upright despite which angle I rotate the needle?
Draging A Scale Needle To One Side Or Another
Hi all, I need to do a Flash movie of a scale with the needle in the middle. The user needs to have the ability to drag the needle left or right. Any suggestions? I tried _rotate but I can't get that to work with a mouse down dragging action.
Thanks.
How Do I Get The Volume Slider To Start At 50% Volume Instead Of 100% Volume?
I have code that sets the volume for the audio clips that I have loaded:
onClipEvent(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);
_root.maxvolume=100;
_root.minvolume=0;
}
onClipEvent(enterFrame)
{
//if(_root.soundstatus=="on") {step=5}
//if(_root.soundstatus=="off") {step=-5}
//_root.maxvolume+=step;
if (_root.maxvolume>100) {_root.maxvolume=100;}
if (_root.maxvolume<0) {_root.maxvolume=0;}
_root.mySound.setVolume(_root.maxvolume);
_root.mySound2.setVolume(_root.maxvolume);
_root.mySound3.setVolume(_root.maxvolume);
_root.mySound4.setVolume(_root.maxvolume);
_root.mySound5.setVolume(_root.maxvolume);
}
I then setup a slider bar to adjust the volume:
onClipEvent (enterFrame) {
_root.maxvolume=this._x
trace(this._x)
}
Then I set the volume based on the dragging of the slider bar:
on (press) {
if(_root.soundstatus <> "off"){
startDrag(this, false, 1, 0, 100, 0)}
}
on (release) {
if(_root.soundstatus <> "off"){
stopDrag()}
}
The issue is that I cannot start the audio volume and slider at 50% of volume instead of 100%. Can someone please look at this code and help me understand how I can load this script so the slider volume starts at 50% not 100%? Thank you.
How Do I Get The Volume Slider To Start At 50% Volume Instead Of 100% Volume?
I have code that sets the volume for the audio clips that I have loaded:
onClipEvent(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);
_root.maxvolume=100;
_root.minvolume=0;
}
onClipEvent(enterFrame)
{
//if(_root.soundstatus=="on") {step=5}
//if(_root.soundstatus=="off") {step=-5}
//_root.maxvolume+=step;
if (_root.maxvolume>100) {_root.maxvolume=100;}
if (_root.maxvolume<0) {_root.maxvolume=0;}
_root.mySound.setVolume(_root.maxvolume);
_root.mySound2.setVolume(_root.maxvolume);
_root.mySound3.setVolume(_root.maxvolume);
_root.mySound4.setVolume(_root.maxvolume);
_root.mySound5.setVolume(_root.maxvolume);
}
I then setup a slider bar to adjust the volume:
onClipEvent (enterFrame) {
_root.maxvolume=this._x
trace(this._x)
}
Then I set the volume based on the dragging of the slider bar:
on (press) {
if(_root.soundstatus <> "off"){
startDrag(this, false, 1, 0, 100, 0)}
}
on (release) {
if(_root.soundstatus <> "off"){
stopDrag()}
}
The issue is that I cannot start the audio volume and slider at 50% of volume instead of 100%. Can someone please look at this code and help me understand how I can load this script so the slider volume starts at 50% not 100%? Thank you.
Flash 8 FLV Playback/Custom UI Volume Components With Global Volume Control
I'm creating a multi-scene swf with several FLV Playback - Player 8 Component videos on different scenes/frames.
I want to use the FLV Playback Custom UI Volume Bar so that when a user makes a volume adjustment during one FLV Playback viewing that volume adjustment will remain throughout the other FLV Playback video viewings.
This will prevent the viewer from having to make volume adjustments for each viewing. However, I want to enable the volume change to be made and changed at any time throughout any of the video viewings. Another aspect of this is that the FLV Playback Component has a volume setting that would have to be overridden by the global custom UI volume setting.
Is this possible? If so, how would this be done?
Thanks!
James
jamesk@pacificmm.com
[F8] FLV Playback/Custom UI Volume Components With Global Volume Control
I'm creating a multi-scene swf with several FLV Playback - Player 8 Component videos on different scenes/frames.
I want to use the FLV Playback Custom UI Volume Bar so that when a user makes a volume adjustment during one FLV Playback viewing that volume adjustment will remain throughout the other FLV Playback video viewings.
This will prevent the viewer from having to make volume adjustments for each viewing. However, I want to enable the volume change to be made and changed at any time throughout any of the video viewings. Another aspect of this is that the FLV Playback Component has a volume setting that would have to be overridden by the global custom UI volume setting.
Is this possible? If so, how would this be done?
Thanks!
James
jamesk@pacificmm.com
Volume Slider Tutorial (changing The Start Volume)
Hi,
This is my first post, also my first problem. Not going so well so far! Okay, i downloaded the tutorial and read through it. Maybe not so well, since i'm a little stuck.
I wanted to modify the slider, so rather than starting off as silent, it starts off so the sound can be heard. So i edited the slider and moved the indicator further along. However, the mp3 cannot be heard until the silder indicator is moved.
i tried modifying the play button to this;
ActionScript Code:
on (release) { if (_root.mySlider.complete == 1) { _root.mySlider.mySound.stop(); mySound.setVolume(_root.volume(ratio)); _root.mySlider.mySound.start(0, 99); }}
but it still doesn't seem to work. Also the 'circles' don't automatically take the height. As soon as I move the slider, the circles 'jump' to the correct size and the volume plays properly.
Also i'd kind of like the song to start playing as soon as its loaded. Okay, i know that i could maybe download something that does all of this already, but i'd rather (or more likely be shown how to) modify the tutorial since i'm a beginner.
Apologies, i'm new to all this. I know some oop, but actionscript and all these properties are a bit new to me.
Thanks in advance,
Volume Buttons Change Volume More Than Once Per Click
I am going to try to explain this as best I can without posting the code for all 4 classes and the timeline.
Information:
I have a class that controls the playing of the sound, it also is hooked up to my volume up and down buttons. I have a class for a button that moves the frame forwards and another that moves the frame backwards. On the timeline I have a layer for sound, where I import the class that does the sound as well as instantiates it and add the child (which is a sound file). The class that plays the sound file also automatically goes to the next frame when the sound is done. Relevant code will be posted after explanation of problem.
Problem:
When the next or back buttons are clicked, flash moves to the next or previous frame, which then does addChild and instantiates the class for sound again. I do have each frame set to SoundMixer.stopAll(); which does stop the sound but it doesn't prevent multiple instances of the class or child being active. So what happens then is that if I hit the next button 5 times, then click the sound up button, the sound goes up 6 times! at once.
Relevant Code:
relevant portions of class that controls sound:
Code:
public static var trans:SoundTransform = new SoundTransform();
Code:
private function soundUp(event:MouseEvent)
{
SoundMain.trans.volume += .2;
trace(SoundMain.trans.volume);
soundChannel.soundTransform = SoundMain.trans;
}
relevant portions of timeline code (on each frame):
Code:
import flash.media.SoundMixer;
SoundMixer.stopAll();
import lesson.SoundMain;
var sndEx2:SoundMain = new SoundMain("micRec2.mp3");
addChild(sndEx2);
partial code in next button class:
Code:
private function oneFrameForward(evt:MouseEvent):void
{
MovieClip(parent).nextFrame();
}
I appreciate any help.
Drag MC And Volume - How To Translate Into Volume 0-100?
Hey there
I am building a room in which you can drag a MC in order to controll pan and volume. I am using:
function drag() {
kasse1Pan.kasse1.startDrag(false, -400, -300, 400, 300);
kasse1Pan.kasse1.onEnterFrame = function() {
pan = 0.25*this._x;
vol = 300+this._y;
kasse1Sound.setPan(pan);
kasse1Sound.setVolume(vol);
};
The problem is that the stage is 800 x 600, and therefore -300 is translated to zero (when the MC is at the top of the stage) and 300 is translated to 600 (when the MC is at the bottom of the stage). Naturally, this causes the volume to distort.
I need find a way to translate the -300 and 300 to 0 and 100% volume.
Can you help? Oh, I hope so...
/Donleavy
Volume Knob And Volume Display
I am creating a mp3 player. I have a functional volume knob. I want it to control a movieclip which shows the status of the volume when the knob is rotated.
Volume - Setting Initial Volume
In addition to code help with setting the initial volume, can anyone tell me why the slider might be staying at the end of the bar once I'm off dragging it.. It doesn't move back to the start of the slider when I drag to increase volume the first time...
This is where the fla file is in case anyone wishes to help me with the latter question...
http://www.clairmonthumphrey.com/Site/humphreytemplate.fla
Thanks so much!
Attach Code
//volume slider
dragger.onPress = function()
{
this.startDrag(true, dragger._x, dragger._y, dragger._x + 95, dragger._y);
};
dragger.onRelease = dragger.onReleaseOutside=function ()
{
stopDrag();
};
dragger.onMouseMove = function()
{
newPoint = new Object();
newPoint.x = this._x
newPoint.y = this._y
_root.slidebar.globalToLocal(newPoint);
_root.s.setVolume(-1*newPoint.x);
}
Volume Slider Bar Innital Volume
I need a simple solution for my volume slider bar problem, I completed the volume slider bar tut. on kirupa and it works for what i'm doing, but i'd like the volume to default to 70 or 80 instead of 0, so that the music plays when the movie starts. I'm sure this is a simple line of code that i'm overlooking, any help would be appreciated.
Thanks!
scott.dixon@itron.com
Volume Slider Bar Innital Volume
I need a simple solution for my volume slider bar problem, I completed the volume slider bar tut. on kirupa and it works for what i'm doing, but i'd like the volume to default to 70 or 80 instead of 0, so that the music plays when the movie starts. I'm sure this is a simple line of code that i'm overlooking, any help would be appreciated.
Thanks!
scott.dixon@itron.com
Mp3 Player Volume Vs Video Player Volume
Hello people!!!
I'm having some trouble on getting a video player to play its sound...
when the movie player is loaded, I tell the mp3 player (that starts playing when the site is loaded) to reduce the volume to 0... but this way, when the movie starts there is no sound because of the mp3 player!
How can I have to different volume bars?!
Please help!
(sorry about the english...portuguese guy)
Set Volume Bug
Ok, I play 2 sounds with this in one keyframe:
m1 = new Sound("/music");
m1.attachSound("music1");
m1.start(0, 999);
//
m2 = new Sound("/music");
m2.attachSound("music2");
m2.start(0, 999);
Volume.......Help Please
I want to be able to make a volume control that is a round knob. I can do it with a up and down volume control, but I want to do it so it turns instead of going up and down. How do I do that??
IF Volume = 0 ?
Hi,
I have a background music ( mySound) and i have a mute button as well (_root.mySound.setvolume(0)). I have some other buttons that i want to give them this assignment: to check and see if the sound is off (meaning _root.mySound.setvolume(0)and if it is already ON leave it alone. I know it need to be something like:
if soundvolume = 0 do this and if soundvolume = 100 do nothing.
help? how to put this in code
Volume Bar
any idea how to make horizontal volume bar that controls my volume in flash? Or is there any componet that i can use it to get sam thing?
Volume
Is there a way to control or set the volume of a loaded movie from within the main timline of the movie it's being loaded into?
Volume?
ok, i have the actionscript for this site to have the volume fade in and then fade out when the audio button is clicked. my question is say i want to click on a link to a web site, i would like for the audio to fade out, but when the person comes back into my site, i want the audio to fade back in without having to actually click on the play button on the audio button, im not sure what i have to do. here is the script i have right now to make the audio fade in and out........
// load audio mp3
function primeSound() {
mySound = new Sound ();
mySound.loadSound("http://www.xscapeproductions.com/dope/system.mp3", true);
}
primeSound();
music = new Sound();
music.start(0, 999999);
// set the volume of the sound to zero
music.setVolume(0);
// set a variable named 'vol'
vol = 0;
// set another variable named 'fade', putting a setInterval function in it
fade = setInterval(fadeIn, 100);
// set the initial fade in function
function fadeIn() {
// fade the sound in with an increment of 3 in the variable 'vol'
vol += 3;
music.setVolume(vol);
// put an if condition to restrict the increment in volume after it reaches to 100
if (vol>=100) {
clearInterval(fade);
// create the 'step' variable
step = 1;
// create the 'fade' variable
Fade = 0;
}
}
// create the fade in and out function
// function executed on onEnterFrame
_root.onEnterFrame = function() {
// set fade out
if (Fade == 1) {
vol = vol-step;
if (vol<0) {
vol = 0;
}
music.setVolume(vol);
// set fade in
} else {
vol = vol+step;
if (vol>100) {
vol = 100;
}
music.setVolume(vol);
}
};
and here is what is on the main audio buttons :.....
on (release) {
(_root.fade=!_root.fade) ? 0 : 1;
}
thanx in advance
sean
Volume
Why oh why when i try and change the volume of on clip does it change the volume of all the clips.
This is the code i am using
mySound = new Sound();
mySound.attachSound("whatever");
mySound.start(0,100);
mySound2 = new Sound();
mySound2.attachSound("trevor");
mySound2.start(0,100);
mySound.setVolume(0);
mySound2.setVolume(0);
Please help its really buggin me . All the books seem to say that this should work
:[
Volume Of An MC
I have a mc loaded into my main movie file, and I want to place a volume controller on the main clip that will control the volume of the loaded mc. how would i go about doing this?
Thanks.
PS: I cannot use the attachSound method.
What's With The Volume?
ok, I figured out that compression of a sound clip plays a part wih volume once its in the library. But, what I've noticed is that with compression options the best sounding version of the clip is with the "raw" setting, but that's only at 50%. Is there a setting so it can be at 100%; to be as true-to-the-origional?
thanks
Set Volume
I need a mute button!
Sound files (7) are on the main timeline every five frames and loop (stop all sounds wont work).
one way i thought was to have a mute button that sets a volume value.
what would be the best way to action, set volume? much thanks! Paul
Set Volume
I need to turn volume on/off
Can I use a button action to set volume.
this.onButton_btn.onRelease = function(){
Im new to actionscripting so need some good data, thanks Paul
Volume
I know its probably a noob question, but i started 3 days ago on 2.0 then yesterday made an mp3 player in 3.0 but i cant figure out how to set the volume, i have the math to make it a number between 0 and 1 but i dont know how to actually set the volume. Any Suggestions?
Help With Volume
I have inherited this code. I would like to mute the volume when playing this swf. But I tried the <param name="volume" value="0" /> and <param name="mute" value="true" /> and they did not work. Please help! The code is below:
<noscript>
<object id="FlashIntro" classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="645" height="245" bgcolor="#FFFFFF" VIEWASTEXT>
<param name="movie" value="Flash/homeFlash.swf" />
<param name="quality" value="high" />
<embed src="Flash/homeFlash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="645" height="245" bgcolor="#FFFFFF" />
</object>
</noscript><script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '645',
'height', '245',
'src', 'Flash/homeFlash',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'FlashIntro',
'bgcolor', '#000000',
'name', 'Flash/knee3d',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'Flash/homeFlash',
'salign', ''
); //end AC code
}
</script>
Volume On And Off
i have various sound effects in my flash site and i want to give the user the option to turn the sound on and off....
anyone know how to do that??
thanks
FLV Volume
No response in the Dreamweaver forum - so I am trying here.
When I insert a Flash video (FLV) from the Dreamweaver insert bar, the
Flash player appears on the page with the volume slider in the center
and the volume at a certain volume. How can I change the default volume
and slider position?
I've tried modifying the FLASHVARS string (in 3 separate places in the
DW code) to no avail.
--
Alec Fehl, MCSE, A+, ACE, ACI
Adobe Community Expert
AUTHOR:
Microsoft Office 2007 PowerPoint: Comprehensive Course (Labyrinth
Publications)
Welcome to Web Design and HTML (Labyrinth Publications)
CO-AUTHOR:
Microsoft Office 2007: Essentials (Labyrinth Publications)
Computer Concepts and Vista (Labyrinth Publications)
Mike Meyers' A+ Guide to Managing and Troubleshooting PCs (McGraw-Hill)
Internet Systems and Applications (EMC Paradigm)
Volume And Pan
So i am working on a widget and I cant seem to get the volume and balance sliders to work right. Can someone take a look at my code and see if you know what going wrong. The web address of the widget is www.buttonbeats.com/sequence.html . The only slider that works is the first one for now. Till i figure out why this one wont work. and the action script is below.
Attach Code
var myvolumebounds:Rectangle=new Rectangle(volumegroove_mc.x, volumegroove_mc.y, 1, volumegroove_mc.height);
var mybalancebounds:Rectangle=new Rectangle(balancegroove_mc.x, balancegroove_mc.y, balancegroove_mc.width, 1);
volume_mc.addEventListener(MouseEvent.MOUSE_DOWN, startdragvolume);
volume_mc.addEventListener(MouseEvent.MOUSE_OUT, stopdrag);
volume_mc.addEventListener(MouseEvent.MOUSE_UP, stopdrag);
balance_mc.addEventListener(MouseEvent.MOUSE_DOWN, startdragbalance);
balance_mc.addEventListener(MouseEvent.MOUSE_OUT, stopdrag);
balance_mc.addEventListener(MouseEvent.MOUSE_UP, stopdrag);
function startdragvolume(myevent:MouseEvent):void{
myevent.target.startDrag(false, myvolumebounds);
}
function startdragbalance(myevent:MouseEvent):void{
myevent.target.startDrag(false, mybalancebounds);
}
function stopdrag(myevent:MouseEvent):void{
myevent.target.stopDrag();
}
var myRequest:URLRequest=new URLRequest ("inst.mp3");
var mySound:Sound = new Sound();
var myChannel:SoundChannel;
var newSetting:SoundTransform = new SoundTransform();
mySound.load(myRequest);
myChannel=mySound.play();
stage.addEventListener(Event.ENTER_FRAME, everyframe);
function everyframe(myevent:Event):void{
var newvolume:Number = (volume_mc.y-volumegroove_mc.y)/100;
var newbalance:Number = ((balance_mc.x-balancegroove_mc.x)/50)-1;
newSetting.volume=newvolume;
newSetting.pan=newbalance;
myChannel.soundTransform=newSetting;
}
stage.addEventListener(Event.ENTER_FRAME, everyframe2);
function everyframe2(event:Event):void {
leftbar.scaleY=(myChannel.leftPeak);
rightbar.scaleY=(myChannel.rightPeak);
}
Volume
Volume.
Hey everone i want a sliding button thing.
So that when i bring it to the top volume=100 and when down to the bottom it =0
Do you get me.
I know there got to be examples on this or you can help nice and easy
Volume Changes
I'm wondering how you change the volume of a sound object that is placed on the timeline in your movie. For example if I want to control the Voice over for a loaded SWF which has the audio within the timeline (i.e. not using the Sound object) from the root of my presentation. Any help on this?
Volume
I did this tutorial http://www.kirupa.com/developer/mx/volume_slider.htm it's kinda what I want but want music to start playing immeditaly.
What do I have to change?
Help With The Volume
Hi!
I am trying to work something out with the info at:
http://www.kirupa.com/developer/mx/volume_slider.htm
My question is, how can I make that the sound doesn't start with 0. I want it to start with a bit higher volume instead of one having to change the volume from start. Where can this be changed?
Please help me out on this one!
Best regards
JoakimN
Volume On/off
Say I have a movie with 4 frames, in each frame is a movieclip that contains audio.
At the end of each movieclip I have gotoandstop action that sends it to the movie clip on the next frame.
I want to make a mute button that reduce the volume to 0 and then can be clicked to put the volume back to 100%.
Can I have one button on a layer that extended across all 4 frames and that would control the volume for the entire movie no matter which movieclip/frame is playing?
I used a stop sounds button but as soon as it goes to the next frame/movieclip the sound starts playing again.
From looking at the other posts I know someone will tell me to go read the tute on sound objects but just wondering if that was possible.
thanks!
Volume & Pan AS
Hi,
I have a project I am working on that requires a volume slider and balance controls and while I know the code I need to use to make them functional what I don't know is the code to do something like this:
I want to make a volume slider like this.
|||||||||||||||
so that when the user drags their mouse over the bars or presses the up key on the keyboard they change from black to red and the volume increases accordingly.
For the balance control I would like pretty much the same thing except I want to use the left and right keyboard keys and the drag event as described above and I want it to look like this.
||||||||||||| (which means the balance is all the way to the right)
I am pretty much a newbie when it comes to this kind of thing so the more help you can offer the better and thanks for any replies in advance.
Volume Changes In AS2
Dear all,
I have looked around but none of the 'mute' tutorials seem to cover the sort of thing I'm looking for.
Basically I have 5 short sound clips that are initiated on rollover and so I can't use the stopallsounds approach.
The code I've tried so far is:
Code:
mutebtn.onRelease = function () {
samhello.setVolume(0);
petehello.setVolume(0);
rohanhello.setVolume(0);
loranhello.setVolume(0);
vickihello.setVolume(0);
}
but it doesn't work
Can anyone see some stupid mistake i'm making? I'm quite new to Flash so go easy =p
Thank you for reading
Fet
How Do I Set Volume?
How to I set the volume of an mp3 when it first loads on to page? I'm not concerned about making a volume bar I just want to make the volume lower.
this is how I have set up my music at the moment:
Code:
var s:Sound = new Sound(new URLRequest("5.mp3"));
var sc:SoundChannel = s.play(0, 99);
sc.soundTransform = new SoundTransform(0.1,-0.2);
AS3 +/- Volume
Hey All,
I'm trying to have volume buttons that increase/decrease my FLV's volume by 1/10, so the volume can be decreased to 0 in 10 clicks of the 'down' volume button, and increased to 1 by 10 clicks of the 'up' volume button (as volume values now go from 0 to 1, not 0 to 100).
The problem is I'm getting strange, long decimal results when I try to do it (and I still get weird results when I round to a single decimal place). I have tried adding/subtracting '0.1', as well as '1/10', but the results are the same. Here are my functions:
Code:
function clickVolUp(e:MouseEvent):void {
if (volTrans.volume < 1) {
var newVol:Number = int((volTrans.volume + 0.1)*10)/10;
volTrans.volume = newVol;
ns.soundTransform = volTrans;
}
};
function clickVolDown(e:MouseEvent):void {
if (volTrans.volume > 0) {
var newVol:Number = int((volTrans.volume - 1/10)*10)/10;
volTrans.volume = newVol;
ns.soundTransform = volTrans;
}
};
All help is appreciated!
Volume Changes
I'm wondering how you change the volume of a sound object that is placed on the timeline in your movie. For example if I want to control the Voice over for a loaded SWF which has the audio within the timeline (i.e. not using the Sound object) from the root of my presentation. Any help on this?
|