dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Loaded Bar and Scrubber Problem

  1. #1
    Senior Member
    Join Date
    Nov 2002
    Location
    uk
    Posts
    172

    Loaded Bar and Scrubber Problem

    Hi

    I'm following the EXCELLENT tutorial on the EXCELLENT www.gotoandlearn.com web site about playing video through flash. I can get my movies to play and my rewind and play buttons are working lovely, but my loader bar and scruber do not move.

    Can anybody se anything wrong in my code?

    I have on stage a movie called loader (instance=loader) and within that movie I have a movie called loaderbar (instance=loaderbar) and a scrubber movie (instance=scrub)

    Here is my code:

    var nc:NetConnection = new NetConnection();
    nc.connect(null);

    var ns:NetStream = new NetStream(nc);

    theVideo.attachVideo(ns);

    ns.play("http://www.chrislewis.tv/test/hampers.flv");

    rewindButton.onRelease = function(){
    ns.seek(0);
    }
    playButton.onRelease = function(){
    ns.pause();
    }

    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 * 313;
    loader.scrub._x = ns.time / duration * 313;
    }

  2. #2
    Senior Member
    Join Date
    Nov 2002
    Location
    uk
    Posts
    172
    I've solved the loader bar problem, but not the scrubber problem.
    Please Help!

    Leroy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center