ActionScript 2.0 :: Make A Volume Slider For An FLV Player?
Mar 25, 2010Explain the code, or point me to a good tutorial for making a volume slider for an FLV player?
View 6 RepliesExplain the code, or point me to a good tutorial for making a volume slider for an FLV player?
View 6 RepliesI am trying to add a volume slider to my flv player, I currently have just a mute button My code is as below
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
[code]....
I'm trying to set up a slider that will adjust the volume of the video that is playing. I currently have a slider that adjusts the progress of the video that works just fine. I set my volume slider up the same way (as far as making it slide and the bounds it's contained within) but it fails to actually be draggable. I click on the slider and it disappears from view instead of allowing me to drag it. It's been a while since I've done any AS work and I'm struggling to figure out the problem here as everything appears to be correct.
View 1 RepliesI'm trying to make a music player with play, pause and stop buttons aswell as a volume slider.However, I'm getting these three errors:
Line 12 1046: Type was not found or was not a compile-time constant: Rectangle.
Line 12 1180: Call to a possibly undefined method Rectangle.
Line 12 1180: Call to a possibly undefined method Rectangle.
Here is my code:
Code:
package {
import flash.events.*;
import flash.display.*;[code].....
I've followed the Flash Video Basics Tutoirals 1-8 here on gotoAndLearn and stopped short of making the "Volume Slider" or "Full Screen" buttons. I've been googling all over and not come up with a simple solution to adding these features to my video player. In addition, a counter for the video length would be awesome.
View 6 RepliesI'm having some trouble with the code below. the flash player has a default volume slider, but I want to use the jQuery slider to change the volume. the volume value(nr) is changing while I move the slider, but the volume of the song doesn't.
<!DOCTYPE html>
<script type='text/javascript'>
$(document).ready(function(){
[Code].....
Is there any way I can create a slider on my desktop to access some of the controls of the YouTube Video player like volume, pause, play, playback speed? I know it is a flash player, but would this involve accessing the YouTube API or something else? For example, I'd like to program something similar to what's provided by the Enounce MySpeed application (control over play back speed).
View 1 RepliesI have seven loops in total. I imported them into the library. i've put each of them in a seperate movie clip with the names loop1,loop2,.In those movie clips, the first (key)frame contains the action stop(); . The second frame is a keyframe too and from here on the sound starts. And of course they loop.Okay, now the buttons to control the movie (Prev, Stop, Play, Next) work fine, but let me explain the system i used. I used a var loopnumber and everytime you click Next or Prev, it '+'es 1 or '-'es 1. I also set a variable number_to_play = "_root.loop"+loopnumber, so you would get _root.loop--number--, where --number-- is 1,2,3,4,5,6 or 7. To actually play the sound, i used tellTarget(number_to_play) {gotoAndPlay(2)}.That's why i added stop(); to the first frame of those clips.how can i make a volume slider for those sounds inside my movie clips ? I've checked this forum already for questions like this but they don't use the system I use.
View 4 Repliesdoes 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 am working in a player and when am trying to make it fullscreen the scrubber and volume bar everything become too big in size.
View 1 RepliesI'm a designer that inherited a project with a volume slider. I'm not that good with actionscript yet and haven't been able to figure out the code. The volume and slider starts at 100%, and I need it to start at 50%. Can you tell me how to set both the volume and slider at 50%? I'm sure it is a simple solution but I can't figure it out. I tried a few things but have not been able to get it to work correctly in both the volume level and start position for the sliderHere's the code on the 2nd frame of the mc:
Code:
stop();
var NiVol:Sound = new Sound(_root.Container);
[code].....
I made a volume slider which works with a draggable mc to control the volume. But I want to do a bit different slider using a mask like the slider in Component box. The aria I want to drag over is a rounded rectangle. I make a rectangle which will be my bound and i use the rounded rectangle to mask it. How should i continue.
View 1 RepliesDirect me to a volume slider tutorial that works for actionscript 3.0? there are some out there but they are all outdated.
I did one that enables me to mouse over an item and move it all over the screen, but I need to get it to scroll along an axis. thats where Im getting hung up.
I actually have a really cool project. an online studio that enables you to rehearse individual parts of songs that I prerecord.
i'm triying to do a slider bar for control volume but all scripts are for vertical or horizontal movement, but i need do it with a light inclination i have been thinking to give to the limits line a value of x an y for upper possition and other value for x and y for lower position but i don't know to do it.
View 3 RepliesI have a horizontal volume slider working, but I'm not sure how to give it the effect of lighting up as the volume is increasing or decreasing. I'm guessing it's something along the lines of controlling a separate movie clip via AS, but I'm not sure how to do it.
View 8 RepliesI need a vertical volume slider, but flash is crazy and instead of increasing volume as you drag it up it decreases it instead because of the origin point. the entire slider device is dragable too, so that is another dillema.
View 4 Repliesi'm triying to do a slider bar for control volume but all scripts are for vertical or horizontal movement, but i need do it with a light inclination i have been thinking to give to the limits line a value of x an y for upper possition and other value for x and y for lower position
View 2 RepliesI have a horizontal volume slider working, but I'm not sure how to give it the effect of lighting up as the volume is increasing or decreasing. I'm guessing it's something along the lines of controlling a separate movie clip via AS, but I'm not sure how to do it.
View 8 RepliesI am trying to use the slider component (aSlider) to control the volume of mySound which is a class called PlaySound. Created an addEventListener for aSlider with a SlideEvent.CHANGE executing a function called changeVolume. Everything else works but I can't seem to get the slider to control the volume of mySound.
import flash.events.Event;import fl.controls.Slider;import fl.events.SliderEvent;import fl.controls.Label;
var mySound:PlaySound = new PlaySound ;
[Code].....
I made a volumeslider, but the problem is that the sound plays at 100% when the slider is down and at 0% when the slider is up.Of course every volumeslider does the opposite. adjust this code so down, the volume becomes 0% and up 100%?
sliderVolume.onPress = function() {
this.startDrag(false,150,150,150,250);
}
[Code]...
How to control the volume of the microphone with a slider?
View 1 Repliesi want to make volume slider for adjust volume ..here i am getting some problem in startDrag and stopDrag method my volume slider Move when mouse cursor on stage (outside of the volume silder),, i assign two listener Mouse_DOWN and Mouse_UP .. for sliding i create One Rectangle (0,0,100,0)
View 3 RepliesI've followed the tutorial [URL] What I would need to do to the Action Script (below) in order to have it so the volume (slider) is set to max when loaded. So the music starts loud instead of muted.
this.ratio = 0;
dragger.onPress = function() {
this.startDrag(true, 0, 0, line._width, 0);
this.onEnterFrame = function() {
ratio = Math.round(this._x*100/line._width);
_root.volume = ratio;
};};
dragger.onRelease = dragger.onreleaseOutside=stopDrag;
_root.createEmptyMovieClip("vsound",_root.getNextHighestDepth())vSound.attachAudio(ns);[code]....
Before i had the volume slider, the mute button was fine. but now, it doesn't work anymore.
I have a flash movie playing some music, but the slider controlling the volume has become unresponsive. I have no idea why. msg me if you want the see the actionscript.
View 1 RepliesI have a volume slider and I want to implement a mute button to mute the sound no matter where the slider is and unmute again when clicked or the slider is moved. I've tried to do it but so far I've managed to mute it and unmute it using the above methods, but whenever I move the slider to another position and go to mute it again, it doesn't work.
View 9 Replies[URL]
can i handle multiple sound through one volume slider by passing parameters and MC instance name?
I've been toying around with this RepublicOfCode tutorial and changed a few things here and there.For example, I wanted a play/pause button in stead of seperate buttons. And I wanted a stop button so people can actually stop the music.Now here lies the problem, play/pause works BUT after I've stopped the music, the music will start again with the play button but it wont pause, it will just start the song again and again and again... On a side note, I wanna try to add a volume slider, seek bar, time remaining, and possible (if i can figure it out, probably also has to do with the XML) a playlist.[code]
View 5 Replies