Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Consufused On Function Of Volume Slider



Hi,

I have attached a sample fla. to illustrate my problem. This movie loads a Loop.mp3, then you have to press the play button for it to start and then move the volume slider to hear it.

I need the the loop to start playing as soon as it's loaded with the voolume slider in the middle. I have tried (novice actionscript knowledge) to edit the script to start playing after it has loaded. by adding the (_root.mySlider.mySound.start(0, 99)
inthe else section of the following code:

onClipEvent (load) {
mySound = new Sound();
mySound.loadSound("just_do_it.mp3", false);
}
onClipEvent (enterFrame) {
downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = "downloading song...";
} else {
complete = 1;
_root.dl = "";
_root.mySlider.mySound.start(0, 99);
}
mySound.setVolume(_root.volume*2);
}

The problem is the I can't hear anything until I press on the slider. Which somehow controls the volume with a trigger function ? I think? I'm totally confused.

Please check out the sampl FLa. it will be easier to understand .
test.fla



Ultrashock Forums > Flash > ActionScript
Posted on: 2004-09-09


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

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,

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.

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

Volume Slider -- How Do I Center Slider?
http://www.kirupa.com/developer/mx/volume_slider.htm

Using the tutorial above, the volume slider always starts at the left end which is starting to become annoying because you always have to move it in order to listen.

How can I place it in the center? I've attempted just dragging it in the middle while editing, but the file ends up not working.

Volume Slider
hi,

i'm trying to create a volume slider. i've followed the tutorial in the actionscripting guide exactly as far as i can tell and it's still not controlling the volume (it is sliding as it should.) does anyone have any ideas? is there something that may be overriding it? (i'm on a mac).

thanks!

Volume Slider
im a flash mx newbie, i was wondering if there are any tutorials on volume button sliders

thanks.

Volume Slider
I have a built an audio player that includes a working volume slider in flash 5. But when I load this SWF into another movie, the volume slider stops working.

Does anybody know of a script that will work for this type of thing???

I've seen many players here, but none of them are built to be loaded into another SWF...and still work.

Let me know if you want to see the script I have been using.

I can also send the FLA....

Volume Slider
hope I am posting this in the right forum???


This is pretty simple...I just don't know where I am going wrong???

I am needing some help with creating a a pretty basic horizontal volume slider for sound control. I thought I had a better understanding of the action script...guess not. If someone could take a look and let me know what to do to control the sound and where I am going wrong....I did this once before and had it working, but can't seem to do so now.

Also, any suggestions on where to find a good tutorial for a basic dragable sound control window with different sound tracks????

Thanks

Volume Slider
I have a 1-frame .fla
i have a button that opens the volume slider,
i have the slider based on (Jo Jabon's Tut except that the final slider MC is not in the main timeline like in the tut, but the actionscript for the loop is.
my prob is that i can't get the slider to control the song's volume.


---------------------------------------------------------------------
can anyone help?

Volume Slider
ive got a slider for the volume and ive got the code to make it slide

on (press) {
startDrag("", false, left, top, right, bottom);
dragging = true;
}
on (release, releaseOutside) {
stopDrag();
dragging = false;
}

It's just i don't know how to link it to my sounds. Ive got 5 sounds at the moment and which ever one is playing needs to be abe to have the volume changed.

Volume Slider
on the volume slider I know you can set the volume for one specific sound out of your library but is there anyway to say when you drag the volume slider every sound in the flash file is set to it, even if it isnt playing yet (like in a music player)

Volume Slider
i have recently undertaken a small project to create a multimedia player for a friends band for their first ep, but when i put in the volume sliders, they don't work.
i have used a volume slider before, however the sound was in the same file, this time it is in an external swf file.
is there anyway to control the volume of this external file using the slider?

thanks for any help

atocp

Volume Slider For This
How would make a horizontal volume slider for this xml driven mp3 player . This file is from flashkit. I would like to modify it by adding volume control of some sort.

Please take a look. I went through the code but did not understand what variable is controlable with the sound object.

Please teach me. Thank you.


code:

cxml.url = "radio.xml";

// Define Objects to hold radio

function Song (title, composer, file) {
this.title = title;
this.composer = composer;
this.file = file;
}

function Station (name, arrSongs) {
this.name = name;
this.arrSongs = arrSongs;
}

function Radio (arrStations) {
this.arrStations = arrStations;
}

function traceRadio (objRadio) {
for (j=0; j<objRadio.arrStations.length; j++) {
traceStation(objRadio.arrStations[j]);
}
}

function traceStation (objStation) {
// first, display station name
trace ("-----------------");
trace ("Station Name: "+objStation.name);
// now display all songs
for (i=0; i<objStation.arrSongs.length; i++) {
traceSong(objStation.arrSongs[i]);
}
}

function traceSong (objSong) {
trace ("title: "+objSong.title);
trace ("composer: "+objSong.composer);
trace ("file: "+objSong.file);
trace ("**");
}

// Not in Use... loaded drop-down list
function loadStations() {
mcStations.removeAll();
for (var i = 0; i < objRadio.arrStations.length; i++) {
mcStations.addItem(objRadio.arrStations[i].name,i);
}
}

function radioPlay () {
trace (">>start");
traceSong(objRadio.arrStations[intStation].arrSongs[intSong]);

txtTitle = objRadio.arrStations[intStation].arrSongs[intSong].title;
txtStation = objRadio.arrStations[intStation].name;
txtComposer = objRadio.arrStations[intStation].arrSongs[intSong].composer;
if (!s) {
s = new Sound();
s.onSoundComplete = function () {
_root.radioNext();
}
}

var filename = objRadio.arrStations[intStation].arrSongs[intSong].file
s.loadSound(filename, true);
s.start();

instStatus.posReset();
instStatus.gotoAndPlay(1);
mLoaded.paramTarget = "s";
mLoaded._visible = true;
mLoaded.gotoAndPlay(1);
}

function radioStop () {
trace (">>stop");
s.stop();
}

function radioNext () {
intSong++;
if (intSong>=objRadio.arrStations[intStation].arrSongs.length) {
intSong = 0;
}
radioPlay();
}

function radioPrevious () {
intSong--;
if (intSong<0) {
intSong = objRadio.arrStations[intStation].arrSongs.length-1;
}
radioPlay();
}

function stationNext () {
intStation++;
if (intStation>=objRadio.arrStations.length) {
intStation = 0;
}
intSong = 0;
radioPlay();
}

function stationPrevious () {
intStation--;
if (intStation<0) {
intStation = objRadio.arrStations.length-1;
}
intSong = 0;
radioPlay();
}

// Initialize Variables
intStation = 0;
intSong = 0;

_root.newSongArray = new Array();
_root.newStationArray = new Array();
_root.objRadio = new Radio();

stop();

Volume Slider
Ok here it is i am contoling an external programs volume via flash and have a volume slider that obviously goes from 0-100
the two commands that i have availible to send are vol plus and minus both raise or lower the vol in 5 % increments
when the slider falls at say 76 or anyhiing that is not an increment of 5 the volume will continually adjust up and then down again
i have a frame with an action


if (volumeslider>flashVolume) {fscommand("VOL+5%","")
}

if (volumeslider<flashVolume) {fscommand("VOL-5%","")
}


this loops the output but i need the continuous feedback to check for adjustments in vol

what ther line can i add to stop this contant flux of the volume

thanks

Volume Slider
I have made a movie clip that contains a volume slider and sound. On the first frame, I have my actions as well as my slider and bar. On the second frame, the text 'Volume' changes into a 'volume percentage indicator'. On the third frame, the text changes back into 'Volume'. In my slider, I have more actions to determine how it slides along hte bar, but I also want it to go to frame 2 when clicked, and when released go to frame 3. I have attatched a copy of my slider so that you can see the problems, as it is hard to explain.

Any help would be great.

Sincerely,
ex

Volume Slider Help
i have made a volume button which when it is clicked opens a volume slider.... and it works fine however, when i roll off the slider and it disappears.. then i click back on the volume button and the slider appears again it is in the original position.. is there anyway to have it appear where it was last left?

thanks

F8 Volume Slider Help
Hi..I am using NetConnection to load external FLV off of buttons. Works fine.
I have buttons that control the pause rewind and so forth for the loaded FLV.
I need to make a volume slider that targets the loaded FLV same as the video contol buttons.


Only slider info I can find is if I were to using the FLV component.

Below is the working code for one of the play buttons. Any help is appreciated or if you can point me toward a tutorial.

stop();
var my_nc = new NetConnection();
my_nc.connect(null);
var step2_ns = new NetStream(my_nc);
step2_ns.onStatus = function (infoObject) {
if(infoObject.level.toLowerCase() == "error") {
trace(infoObject.code);
}}
holder_video.attachVideo(step2_ns);

this.buttons.attachVideo_btn.onPress = function () {
step2_ns.play("ballys.flv");
}

Volume Slider
Hi all
i try to make a volume slider with this code:

Code:
//setting up the variables that constrain the slider
//bar: the rail in which the slider will move
//slider_mc: the slider
var bar_height = getProperty(bar,_height);
var bar_y = getProperty(bar,_y);
var slider_mc_width = getProperty(slider_mc,_width);
var slider_mc_x = getProperty(slider_mc,_x);
var slider_mc_height = getProperty(slider_mc,_height);
var leftLim = slider_mc_x;
var topLim = bar_y;
var rightLim = slider_mc_x;
var botLim = bar_y + bar_height - slider_mc_height;
//implementing the sound clip "mix"
var hxos:Sound=new Sound();
hxos.attachSound("mix");
hxos.start(0,999);
//adjusting the volume
slider_mc.onEnterFrame=function(){
var getLevel = (((slider_mc._y) - topLim + slider_mc_height) / bar_height)*100;
this.onPress=function(){
startDrag(this,true,leftLim,topLim,rightLim,botLim);
}
hxos.setVolume(100-getLevel);
this.slider_mc.onRelease=function(){
stopDrag();
}
}
the problem is that the stopDrag fuction doesn't worck and when i release the slider it keeps movig along with the mouse. Am i doing something wrong? I'm using flash 8. Any help will be appreciated. Thanx in advance

Volume Slider
I have been having this problem with my volume slider. It keeps resetting itself to 100% when i navigate to a new scene. The music does not go back to the begining just the volume slider resets. My volume slider is a symbol. I am guessing that when i navigate to a new scene it is reloading the symbol and it's as, cause i have it scripted in the symbol editing mode. Can anyone help? Here is the code. Thanks in advance.


top = vol._y;
left = vol._x;
right = vol._x;
bottom = vol._y+100;
level = 100;
//
vol.onPress = function() {
startDrag("vol", false, left, top, right, bottom);
dragging = true;
};
vol.onRelease = function() {
stopDrag();
dragging = false;
};
vol.onReleaseOutside = function() {
dragging = false;
};
//
this.onEnterFrame = function() {
if (dragging) {
level = 100-(vol._y-top);
} else {
if (level>100) {
level = 100;
} else if (level<0) {
level = 0;
} else {
vol._y = -level+100+top;
}
}
_root.dynamic_sound.setVolume(level);
};

Volume Slider
Hi!
i did this tutorial : http://www.actionscript.org/resource...hod/Page1.html
After i done this tutorial i was able to great 1 slider that could controle the volume of a sound. It was working well. the code for it was:

Code:
//musicslider
bgSound.setVolume(muslvl);
bgSound = new Sound(_root.slider);
bgSound.attachSound("sound1");
bgSound.start(0, 99);
slider.slideBar._y = -muslvl;
slider.slideBar.onEnterFrame = function() {
bgSound.setVolume(muslvl);
muslvl = 0-this._y;
};
slider.slideBar.onPress = function() {
startDrag(this, false, this._x, -65, this._x, 0);
};
slider.slideBar.onRelease = slider.slideBar.onReleaseOutside=function () {
stopDrag();
};
Up to now i was happy and i had no problem. Tho i cam out with the idea of making another slider! instead of calling it slider ( that slider was to controle the music of my game) i called it sliderSFx (that slider controle the sound effects of my game) than i wrote this code so the slider worke together :


Code:
//musicslider
slider.slideBar._y = -muslvl;
slider.slideBar.onEnterFrame = function() {
bgSound.setVolume(muslvl);
muslvl = 0-this._y;
};
slider.slideBar.onPress = function() {
startDrag(this, false, this._x, -65, this._x, 0);
};
slider.slideBar.onRelease = slider.slideBar.onReleaseOutside=function () {
stopDrag();
};
stop();
//SFx slider
punch1.setVolume(SFxlvl);
punch1 = new Sound(_root.sliderSFx);
punch1.attachSound("punch1");
sliderSFx.slideBarSFx._y = -SFxlvl;
sliderSFx.slideBarSFx.onEnterFrame = function() {
punch1.setVolume(SFxlvl);
SFxlvl = 0-this._y;
};
sliderSFx.slideBarSFx.onPress = function() {
startDrag(this, false, this._x, -65, this._x, 0);
};
sliderSFx.slideBarSFx.onRelease = sliderSFx.slideBarSFx.onReleaseOutside=function () {
stopDrag();
};
stop();
now there is 2 slider. on the slider "slider" there is back ground music playing a little funny song. you can go up and down with the slider and the volume go up and down. just next to it you got the slider "sliderSFx" wich got a slider and a buton written test on it. When you press the test buton it plays a sound effects to show you how strong is the volume of the sound effects in the game. so more you raise de "sliderSFx" stronger is the volume. Now my probleme is that i can move the "sliderSFx" without changing the volume of the back ground music but i can't change the music volume without changing the volume of the sound effects. when i get the music slider down it bring the sound effects volume down 2... i just dont know why. i can't figure why this is happening! and it's making me crazy!!! :P i really need your help so i can go on in my game... also here is a link to my game so you can actually sees what happen when you move the sliders. pls help me!! i dont know what to do!!!

link to the swf:http://img176.imageshack.us/my.php?i...zbackupal4.swf
*chose option and than audio to get to the sliders.

PLS HELP ME!!!

Volume Slider
I have made a volume slider. It works fine but I want the volume to start at the top not the bottom.

Please can anyone help?

heres the code:

onClipEvent(load){
myY=_y=248.5;
top=_y-_root.mySliderBar._height;
bottom= _y;
right=_x;
left=_x;

_root.thisSound.setVolume(0);
}

on(press){
startDrag("",false,left,top,right,bottom);
}

on(release){
stopDrag();

_root.thisSound.setVolume((myY-_y)*100/_root.mySliderBar._height);
}



Thank you

Volume Slider For Flv
Does anyone know where I can find an example of a volume slider that
controls the volume of a progressive download FLV (Not using the media
components)?

thanks,
jp

Volume Slider Bar
I have a volume slider bar that works and all is good. I am wondering if there is a way to access the users computer to get the volume on it? I think of this because I know you can get the users Time and Date among various other things. Is it possible to adjust the computer volume on the actual computer?

Thanks in advance for the input!
Luke







Attach Code

snd = new Sound(this);
snd.onLoad = function (succes) {
if (succes) {
snd.start(0, 1);
}
}

_root.slider.control._y = -50;
_root.slider.control.onEnterFrame = function() {
mcMedia.snd.setVolume(0-this._y);
}
_root.slider.control.onPress = function() {
startDrag(this, false, this._x, -100, this._x, 0);
}
_root.slider.control.onRelease = function() {
stopDrag();
}

Volume Slider
Hello, I have created a volume slider with a button that starts in the center. When I drag the button left, the volume increases. When I drag right the volume decreases. How do I change the volume so that dragging left will decrease the sound and dragging right will increase the sound?

onClipEvent (load) {
top = _y;
bottom = _y;
center = _x;
left = center - 40;
right = center + 40;

}
onClipEvent (enterFrame) {
if (dragging == true) {
this._parent.mySound.setVolume(100-((_x-center)*2.5));
}
}

Volume Slider
I am using this tutorial / FLA for some work;

http://www.kirupa.com/developer/mx/volume_slider.htm

However, I want to stream a large(ish) file so want it playing while it still downloads.

Can anyone help me with the actionscript here, so instead of downloading then playing, it plays automatically (or even better, after a 15 second wait);

onClipEvent (enterFrame) {
downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = "downloading song...";
} else {
complete = 1;
_root.dl = "";
}

Help With Volume Slider
hi

I have just used the tutorial How To Make A Volume Slider
and was wondering can the flash play .wav files for instance the file name is hardyz.wav


would i just change it to this?

onClipEvent (load) {
mySound = new Sound();
mySound.loadSound("hardyz.wav", false);
}
onClipEvent (enterFrame) {
downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = "_database loading //";
} else {
complete = 1;
_root.dl = "";
}
mySound.setVolume(_root.volume*2);
}


if so I have done this and saved the SWF and it dosn't play

Volume Slider
is it possible to make a volume slider in the mp3 player of this link:
http://www.kirupa.com/web/xml/examples/MP3playlist.htm
cuz i tried almost evrything but it aint workin

and if it is possible could someone tell me how or put an fla file online

i hope someone can help me

Volume Slider Bug?
Hello

I'm pretty new to actionscript coding and i'm attempting to make a volume slider for my website.

I have it working from the tutorial on this site but it has a bug.

When you click the play button it plays the sound but if you click it again it plays it again without stopping the previous one. This means i could have two instances of the same soundplaying.

I'd also like to know if it's possible to get the sound to play as soon as its loaded, so the user doesn't have to press the play button.

thanks

Herbiegrey

Volume Slider Tut
ok i was reading that tut kirupa posted about volume sliders and you have to download a file but i wanted to no how to make it from scratch so i made this tutorial.

tell me what you think

http://chris9902.free-host.com/volume.htm

Volume Slider Help
I recently used this volume slider here: http://www.kirupa.com/developer/mx/volume_slider.htm and I'm please by the results. Theres one thing I'm stuck on, I'd like the mp3 to autoplay when the site is entered. Is there action script I can add to achieve this?

Flv Volume Slider
Hi there people

I am trying to add a volume slider to my flv player, I currently have just a mute button
Please help me.

Cheers

My code is as below

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
ns.setBufferTime(10);
ns.onStatus = function(info) {
trace(info.code);
if(info.code == "NetStream.Buffer.Full") {
bufferClip._visible = false;
}
if(info.code == "NetStream.Buffer.Empty") {
bufferClip._visible = true;
}
if(info.code == "NetStream.Play.Stop") {
ns.seek(0);
}
}
ns.play("eclips.flv");
playButton.onRelease = function() {
ns.pause();
}
rewindButton.onRelease = function() {
ns.seek(0);
}
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
var duration:Number;
ns["onMetaData"] = function(obj) {
duration = obj.duration;
}
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 208.9;
loader.scrub._x = ns.time / duration * 208.9;
}
var scrubInterval;
loader.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit,10);
this.startDrag(false,0,this._y,208,this._y);
}
loader.scrub.onRelease = loader.scrub.onReleaseOutside = function() {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus,100);
this.stopDrag();
}
function scrubit() {
ns.seek(Math.floor((loader.scrub._x/208)*duration));
}
var theMenu:ContextMenu = new ContextMenu();
theMenu.hideBuiltInItems();
_root.menu = theMenu;
var item1:ContextMenuItem = new ContextMenuItem("::::: Video Controls :::::",trace);
theMenu.customItems[0] = item1;
var item2:ContextMenuItem = new ContextMenuItem("Play / Pause Video",pauseIt,true);
theMenu.customItems[1] = item2;
var item3:ContextMenuItem = new ContextMenuItem("Replay the Video",restartIt);
theMenu.customItems[2] = item3;
var item4:ContextMenuItem = new ContextMenuItem("© 2005 Lee Brimelow",trace,true);
theMenu.customItems[3] = item4;
function pauseIt() {
ns.pause();
}
function stopIt() {
ns.seek(0);
ns.pause();
}
function restartIt() {
ns.seek(0);
}
_root.createEmptyMovieClip("vSound",_root.getNextH ighestDepth());
vSound.attachAudio(ns);
var so:Sound = new Sound(vSound);
so.setVolume(100);
mute.onRollOver = function() {
if(so.getVolume()== 100) {
this.gotoAndStop("onOver");
}
else {
this.gotoAndStop("muteOver");
}
}
mute.onRollOut = function() {
if(so.getVolume()== 100) {
this.gotoAndStop("on");
}
else {
this.gotoAndStop("mute");
}
}
mute.onRelease = function() {
if(so.getVolume()== 100) {
so.setVolume(0);
this.gotoAndStop("muteOver");
}
else {
so.setVolume(100);
this.gotoAndStop("onOver");
}
}

Volume Slider
hi there,

ive just tried a tutorial of Kirupa for a volume slide feature, take a look:

http://www.kirupa.com/developer/mx/volume_slider.htm

basically ive done it succesfully except for knowing afterwards that it was being aimed at one partucular sound loop....

is there any adjustment or anything i need to do in order to make this volume slider adjust the volume for all sounds within the swf file??


could someone help me out,....i would really appreciate it!! :THUMB:


thnx in advance!!

Volume Slider
HI, im currently working on a site for a band, and wish to have a volume slider playing one song when the site opens.

I went through the tutorial on this site, and used the source they provided, but iv obviously done something wrong.

Iv attached the fla, incase anyone can point out an error iv made.

The file i want loaded is an mp3, approx 3mb in size. I figured changing the actionscript from false to true would stream this, but nothing seems to be happening.

Thanks

Volume Slider
I am using this tutorial / FLA for some work;

http://www.kirupa.com/developer/mx/volume_slider.htm

However, I want to stream a large(ish) file so want it playing while it still downloads.

Can anyone help me with the actionscript here, so instead of downloading then playing, it plays automatically (or even better, after a 15 second wait);

onClipEvent (enterFrame) {
downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = "downloading song...";
} else {
complete = 1;
_root.dl = "";
}

Help With Volume Slider
hi

I have just used the tutorial How To Make A Volume Slider
and was wondering can the flash play .wav files for instance the file name is hardyz.wav


would i just change it to this?

onClipEvent (load) {
mySound = new Sound();
mySound.loadSound("hardyz.wav", false);
}
onClipEvent (enterFrame) {
downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = "_database loading //";
} else {
complete = 1;
_root.dl = "";
}
mySound.setVolume(_root.volume*2);
}


if so I have done this and saved the SWF and it dosn't play

Volume Slider
is it possible to make a volume slider in the mp3 player of this link:
http://www.kirupa.com/web/xml/examples/MP3playlist.htm
cuz i tried almost evrything but it aint workin

and if it is possible could someone tell me how or put an fla file online

i hope someone can help me

Volume Slider
Does anyone know how to make a volume slider? If not how about a way to kill the music when the file loops. Go to www.oddtodd.net to see what I mean. I want the viewer to be able to kill music but my animation needs to loop so the music keeps repeating.
Thanks,
t5

Volume Slider
Hi,

I'm having a hard time trying to figure out how to put a volume slider on a site. Does anyone have any suggestions or tips?

Thanks.
LHAWORLD

Volume Slider
Can someone tell me how to create a volume slider that controls the volume of a movie clip instance? Thanks.

[as] Volume Slider :S
Im really stuck on this, I dunno even really where to start.

I want to make a volume slider for an audio component im working on. The slider moves up an down an its range of movement is 71.5 pixels, it can move from y12.9 - y84.4

I've created a sound object called music and i'm gettin the volume with getVolume - i just dont understand the maths on how i can convert the current volume to poistion the slider correctly and for it to be able to change the volume depending on its y value.

Any help would be greatly appreciated thanks!

Volume Slider
I have been surfing the web for about 1-2 hours trying examples and going through code and none have worked that I spent time with. I load an MP3 externally (from the FLA/SWF directory) and when I click the song title, it plays the song. I want the volume control to change the sound, maybe "master volume"? so that the person does blow their ears.

thanks in advanced,
shawn

Volume Slider Problem
I have some background music whose volume is controlled by the distance it slides.

// set the value of the *volume* by getting the x position of the slider
volume = int (slider._x);

I've published this swf and loaded over top of my main swf so it plays across all scenes. In some scenes there is a picture gallery whose thumbnails scroll in x based on mouse position. As soon as it hits the spot where the thumbs are controlled by position of the mouse, my volume slider is no longer able to slide.
Does anyone know of a work around for something like this?

Volume And Pan Slider On The Null
I have been going over Joe Jabon's volume and pan slider twice, I doublechecked every action I even copied his actionsscripts from his downloaded Fla(how I love these) into my workout movie.

But alas it still does'nt work. Altough when I test the movie from his Fla it works.

I must be doing something wrong but what?
Help somebody!

Volume Slider Trouble
I'm having some trouble with my volume control. My volume control loads at the highest volume (far right) on the slider. Here is the scripts. Any ideas? I had it working and now its its screwed up somehow. Its no big deal but would be nice not to make my viewer deaf when the page loads
-Mark
Script for slidder button:

on (press) {
startDrag ("", false, -50, 0, 50, 0);
}
on (release, dragOut) {
stopDrag ();
}
__________________________________________________ _
script for the instance of the volume slider:
onClipEvent (load) {
_parent.volSlider.drag._x += 50;
}
onClipEvent (enterFrame) {
vol = _parent.volSlider.drag._x+50;
_parent.mySound.setVolume(vol);
_parent.volAt = Math.round(vol);
}

Volume Slider Control ?
hi...
any volume slider control ?? out there ?
Fla please

Volume Slider Control ?
hi...
any volume slider control ?? out there ?
Fla please


Regards

Volume Slider Code.
On (Press) ;
/:mute=0;
set Property("_root.audioBar.bar",_alpha,65);
startDrag("_root.audioBar.bar",true,0,0,0,117);
if (_ymouse<=116.7);{
/:mousey=_ymouse;
setProperty("_root.audioBar.bar",_y, /:mousey);
} else {
set Property("_root.audioBar.bar",_y,116.7);
/:mousey=116.7;
}
/volume=(((116.7-/:mousey)/116.7)*100);
_root.song.setVolume(/:volume);


My question is at the volume part. I dun understand why i have to divide by 116.7 again and then mutiply by 100.

Copyright © 2005-08 www.BigResource.com, All rights reserved