haider
08-27-2007, 08:49 AM
hi guys and ladies. :cool:
i have a problem with uploading my website to an ftp server,
basically everything works fine locally but when uploaded into the ftp,
the video links dont work.
i am controlling the videos by a variable ns in my video player ,
i am also using a combo box to select the video being played here are the codes.
the combo box name is selectClip, its contained in a MC (move1)
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
rewind.onRelease = function() {
ns.seek(0);
}
pllay.onRelease = function() {
ns.pause();
}
stopp.onRelease = function() {
_root.ns.close();
}
//scrubber bar
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 * 409.8;
loader.scrub._x = ns.time / duration * 409.8;
}
var scrubInterval;
loader.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit,10);
this.startDrag(false,0,this._y,409.8,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/409.8) * duration));
}
//test
var selectListener = new Object();
selectListener.change = function(){
_root.ns.close();
_root.ns.play(move1.selectClip.selectedItem.data);
}
_root.move1.selectClip.addEventListener("change", selectListener);
playRandomClip();
//test1
var selectListener = new Object();
selectListener.change = function(){
_root.ns.close();
_root.ns.play(move1.selectClip1.selectedItem.data) ;
}
_root.move1.selectClip1.addEventListener("change", selectListener);
playRandomClip();
thanks guys for the help
i have a problem with uploading my website to an ftp server,
basically everything works fine locally but when uploaded into the ftp,
the video links dont work.
i am controlling the videos by a variable ns in my video player ,
i am also using a combo box to select the video being played here are the codes.
the combo box name is selectClip, its contained in a MC (move1)
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
rewind.onRelease = function() {
ns.seek(0);
}
pllay.onRelease = function() {
ns.pause();
}
stopp.onRelease = function() {
_root.ns.close();
}
//scrubber bar
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 * 409.8;
loader.scrub._x = ns.time / duration * 409.8;
}
var scrubInterval;
loader.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit,10);
this.startDrag(false,0,this._y,409.8,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/409.8) * duration));
}
//test
var selectListener = new Object();
selectListener.change = function(){
_root.ns.close();
_root.ns.play(move1.selectClip.selectedItem.data);
}
_root.move1.selectClip.addEventListener("change", selectListener);
playRandomClip();
//test1
var selectListener = new Object();
selectListener.change = function(){
_root.ns.close();
_root.ns.play(move1.selectClip1.selectedItem.data) ;
}
_root.move1.selectClip1.addEventListener("change", selectListener);
playRandomClip();
thanks guys for the help