# Volume bar component - how to link to video

**URL:** https://forum.kirupa.com/t/volume-bar-component-how-to-link-to-video/243074
**Category:** Uncategorized
**Created:** [November 2, 2007, 2:38pm UTC](https://forum.kirupa.com/t/volume-bar-component-how-to-link-to-video/243074 "2007-11-02T14:38:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tommyb](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@tommyb](https://forum.kirupa.com/u/tommyb)
#### Post date: [November 2, 2007, 2:38pm UTC](https://forum.kirupa.com/t/volume-bar-component-how-to-link-to-video/243074/1 "2007-11-02T14:38:14Z")

</div>

this is probably a simple question, but i’ve looked around and can’t find a simple answer, so here goes.

i’ve got a video that i’ve added my own controls to - play button, scroll bar etc. but i don’t know how to add the volume bar (from the components list)

thanks

* * *

this is what my actionscript looks like btw:

var nc:NetConnection = new NetConnection ();  
nc.connect(null);  
var ns:NetStream = new NetStream(nc);  
theVideo.attachVideo(ns);  
ns.play(“[http://pptest.dombreadmore.co.uk/CCKtrailer\_Large.flv](http://pptest.dombreadmore.co.uk/CCKtrailer_Large.flv)”);  
rewindButton.onRelease = function() {  
ns.seek(0);  
}  
playButton.onRelease = function() {  
ns.pause();  
}  
var videoInterval = setInterval(videoStatus,100);  
var amountLoaded:Number;  
var duration:Number;  
var duration2:Number;  
ns[“onMetaData”] = function(obj) {  
duration = obj.duration;  
duration2 = obj.duration;  
}

function videoStatus() {  
amountLoaded = ns.bytesLoaded / ns.bytesTotal;  
loader.loadbar.\_width = amountLoaded \* 218;  
loader.scrub.\_width = ns.time / duration \* 218;  
loader.point.\_x = ns.time / duration2 \* 218;  
}
