Jump to content
Search Community

calimero

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by calimero

  1. Hi,
     
    I try to load a video (mp4) with Loadermax but I have a problem with the progressbar. When I test the flash movie in local everything is ok , the progress bar progress until the end and the movie start. But when I put the files on the servor, the progress bar just progress a little bit and disappear before the movie start.
    Does someone has an idea of what happen?
    Thank you.

    Here is my code:

     

    import com.greensock.*;
    import com.greensock.plugins.*;
    import com.greensock.easing.*;
    import com.greensock.loading.*;
    import com.greensock.events.LoaderEvent;
    import com.greensock.loading.display.*;
    import com.greensock.loading.display.ContentDisplay;

    var loader:SelfLoader = new SelfLoader(this, {name:"self", onProgress:progressHandler, onComplete:completeHandler});
    var video:VideoLoader = new VideoLoader("Medias/Videos/trainstationnight4_2.mp4", {name:"myVideo", container:this, width:1920, height:1080, autoPlay:false, volume:0});
    var queue:LoaderMax = new LoaderMax({onProgress:progressHandler, onComplete:completeHandler});
    queue.append(loader); //just to include the root swf in the progress calculations
    queue.append(video);
    queue.load();

    function progressHandler(event:LoaderEvent):void {
     progressBar_mc.scaleX = event.target.progress;
    }

    function completeHandler(event:LoaderEvent):void {
    video.playVideo();
    TweenLite.to(video, 2, {volume:0.5});
    }

    function errorHandler(event:LoaderEvent):void {
        trace("error occured with " + event.target + ": " + event.text);
    }
     

×
×
  • Create New...