Hi guys,

I've created buttons that should allow the user to fast forward/rewind Here's the code:

mcForward.onPress = function():Void {
videoBg._visible = false;
this.onEnterFrame = function():Void {
ns.seek(ns.time+5);
};
};
mcForward.onRelease = function():Void {
delete this.onEnterFrame;
};
mcBackward.onPress = function():Void {
videoBg._visible = false;
this.onEnterFrame = function():Void {
ns.seek(ns.time-5);
};
};
mcBackward.onRelease = function():Void {
delete this.onEnterFrame;
};

It's acting erratically per video. Sometimes it works but other times it's just not at times:

1) The fast forward button fast forwards to the end, and then back to the beginning. It's working as a loop.

2) the rewind button isn't rewinding to the beginning.

I am having issues attaching the file. Maybe it's too big. Here's the code instead:

=======

mcPause._visible = false;
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.setBufferTime(30);
theVideo.attachVideo(ns);
ns.play("reel2007.flv");
ns.pause(true);
ns.seek(0);
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded:Number;
var duration:Number;
ns["onMetaData"] = function (obj) {
duration = obj.duration;
};
ns.onStatus = function(oInfo:Object):Void {
trace(oInfo.code);
if (oInfo.code == "NetStream.Play.Start") {
//trace("movie has started");
}
if (oInfo.code == "NetStream.Play.Stop") {
trace("movie ended");
ns.seek(0);
ns.pause();
mcPlay._visible = true;
mcPause._visible = false;
videoBg._visible = true;
}
};
function videoStatus() {
amountLoaded = ns.bytesLoaded/ns.bytesTotal;
loader.loadbar._width = amountLoaded*69;
loader.scrub._x = ns.time/duration*68;
}
var scrubInterval;
loader.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit, 10);
this.startDrag(false, -2, this._y, 68, 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/68)*duration));
}
mcForward.onPress = function():Void {
videoBg._visible = false;
this.onEnterFrame = function():Void {
ns.seek(ns.time+5);
};
};
mcForward.onRelease = function():Void {
delete this.onEnterFrame;
};
mcBackward.onPress = function():Void {
videoBg._visible = false;
this.onEnterFrame = function():Void {
ns.seek(ns.time-5);
};
};
mcBackward.onRelease = function():Void {
delete this.onEnterFrame;
};
mcPlay.onRelease = function():Void {
videoBg._visible = false;
mcPlay._visible = false;
mcPause._visible = true;
ns.pause();
};
mcPause.onRelease = function():Void {
mcPlay._visible = true;
mcPause._visible = false;
ns.pause();
};
// build sound object
this.createEmptyMovieClip("snd", 0);
snd.attachAudio(ns);
audio = new Sound(snd);
unmuteBut._visible = false;
var volInterval = setInterval(volStatus, 100);
function volStatus() {
slide = (volSlider._x-55)*2;
audio.setVolume(slide);
trace(audio.getVolume());
}
var volMeterval = setInterval(volMeter, 10);
function volMeter() {
vol_meter._x = volSlider._x-1;
}
// volume slider
volSlider.onPress = function() {
this.startDrag(false, 55, this._y, 154.0, this._y);
};
volSlider.onRelease = volSlider.onReleaseOutside=function () {
this.stopDrag();
};
stop();

======

Any ideas? Pretty please with a cherry on top?!

CHEERS!!!!!