Video+XML doesn't work in Explorer and Safari

Hey, :slight_smile:

I did a video player (XML feed) and it works perfectly (or almost, the loadBar doesn’t work yet) in the Firefox. But for some reason it doesn’t work in Explorer and Safari.

I’ve tried to change the AS, the XML, to export an older version, test in other computers. Always the same problem.

The test link: http://www.arpx.com.br/teste.html (click on ‘PUBLICIDADE’)

Does anyone know what’s happening?

Thanks, thanks, thanks . abstrato

Here’s my video player AS2 code:


//// VIDEOBOX ////////////////
videoBox = function (mcTarget:MovieClip) {
    mcTarget.videoBarMC.loadBarVideoMC._width = 0;
    mcTarget.videoBarMC.progressBarVideoMC._width = 0;
    mcTarget.videoBarMC.scrubberVideoMC._alpha = 0;
    mcTarget.videoBarMC.dragScrubberMC._alpha = 0;
    //
    //////// VIDEO SETTINGS
    var videoConnection:NetConnection = new NetConnection();
    videoConnection.connect(null);
    var videoObject:NetStream = new NetStream(videoConnection);
    mcTarget.videoContainer.attachVideo(videoObject);
    var videoPlaying:Boolean = true;
    //
    //////// XML
    var contentXML:XML = new XML();
    contentXML.ignoreWhite = true;
    contentXML.load(XMLfile);
    contentXML.onLoad = function(ok) {
        if (ok) {
            var video:String = contentXML.childNodes[0].childNodes*.childNodes[0].attributes.mediaFile;
            videoObject.play(video);
            //
            mcTarget.arrowBackwardMC.onRelease = function() {
                videoObject.close();
                this._parent.videoBarMC.loadBarVideoMC._width = 0;
                this._parent.videoBarMC.progressBarVideoMC._width = 0;
                videoDuration = 0;
                amountLoaded = 0;
                videoArrowBackwardRelease(this);
            };
        }
    };
    //
    //////// BUFFER
    videoObject.setBufferTime(5);
    videoObject.onStatus = function(info) {
        if (info.code == "NetStream.Buffer.Full") {
            mcTarget.bufferIconMC._visible = false;
        }
        if (info.code == "NetStream.Buffer.Empty") {
            mcTarget.bufferIconMC._visible = true;
        }
        //                                        
        if (info.code == "NetStream.Play.Stop") {
            mcTarget.stopMC.onRelease();
            mcTarget.bufferIconMC._visible = false;
        }
    };
    //
    //////// INTERVALS
    var amountLoaded:Number;
    var barsMaxWidth:Number = 300;
    var intervalValue:Number = 10;
    //
    var videoDuration:Number;
    videoObject["onMetaData"] = function (v) {
        videoDuration = v.duration;
    };
    //
    function videoStatus() {
        amountLoaded = videoObject.bytesLoaded/videoObject.bytesTotal;
        mcTarget.videoBarMC.loadBarVideoMC._width = amountLoaded*barsMaxWidth;
        mcTarget.videoBarMC.dragScrubberMC._x = videoObject.time/videoDuration*barsMaxWidth;
        mcTarget.videoBarMC.progressBarVideoMC._width = mcTarget.videoBarMC.dragScrubberMC._x;
        if (mcTarget.videoBarMC.dragScrubberMC._x<1) {
            mcTarget.videoBarMC.progressBarVideoMC._width = 0;
        }
    }
    var videoInterval = setInterval(videoStatus, intervalValue);
    //
    var scrubberInterval;
    function scrubberWorks() {
        videoObject.seek(Math.floor((mcTarget.videoBarMC.dragScrubberMC._x/barsMaxWidth)*videoDuration));
        mcTarget.videoBarMC.progressBarVideoMC._width = mcTarget.videoBarMC.dragScrubberMC._x;
    }
    mcTarget.videoBarMC.scrubberVideoMC.onPress = function() {
        clearInterval(videoInterval);
        scrubberInterval = setInterval(scrubberWorks, intervalValue);
        mcTarget.videoBarMC.dragScrubberMC._x = this._xmouse;
        mcTarget.videoBarMC.dragScrubberMC.startDrag(false, 0, mcTarget.videoBarMC.dragScrubberMC._y, barsMaxWidth, mcTarget.videoBarMC.dragScrubberMC._y);
    };
    mcTarget.videoBarMC.scrubberVideoMC.onRelease = mcTarget.videoBarMC.scrubberVideoMC.onReleaseOutside=function () {
        videoInterval = setInterval(videoStatus, intervalValue);
        clearInterval(scrubberInterval);
        mcTarget.videoBarMC.dragScrubberMC.stopDrag();
    };
    //
    //////// AUDIO SETTINGS
    mcTarget.createEmptyMovieClip("videoSoundContainer", mcTarget.getNextHighestDepth());
    mcTarget.videoSoundContainer.attachAudio(videoObject);
    var videoSound:Sound = new Sound(mcTarget.videoSoundContainer);
    videoSound.setVolume(100);
    //
    //////// BUTTONS ACTIONS
    mcTarget.playPauseMC.onRelease = function() {
        videoObject.pause();
        if (videoPlaying == true) {
            this.gotoAndStop("playOverFrame");
            videoPlaying = false;
        } else {
            this.gotoAndStop("pauseOverFrame");
            videoPlaying = true;
        }
    };
    mcTarget.playPauseMC.onRollOver = function() {
        if (videoPlaying == true) {
            this.gotoAndStop("pauseOverFrame");
        } else {
            this.gotoAndStop("playOverFrame");
        }
    };
    mcTarget.playPauseMC.onRollOut = mcTarget.playPauseMC.onReleaseOutside=function () {
        if (videoPlaying == true) {
            this.gotoAndStop("pauseFrame");
        } else {
            this.gotoAndStop("playFrame");
        }
    };
    //
    mcTarget.stopMC.onRelease = function() {
        mcTarget.playPauseMC.gotoAndStop("playFrame");
        if (videoPlaying == true) {
            videoObject.seek(0);
            videoObject.pause();
            videoPlaying = false;
        } else {
            videoObject.seek(0);
        }
    };
    mcTarget.stopMC.onRollOver = function() {
        this.gotoAndStop(2);
    };
    mcTarget.stopMC.onRollOut = mcTarget.stopMC.onReleaseOutside=function () {
        this.gotoAndStop(1);
    };
    //
    mcTarget.volumeMC.onRelease = function() {
        if (videoSound.getVolume() == 100) {
            this.gotoAndStop("muteOnOverFrame");
            videoSound.setVolume(0);
        } else {
            this.gotoAndStop("muteOffOverFrame");
            videoSound.setVolume(100);
        }
    };
    mcTarget.volumeMC.onRollOver = function() {
        if (videoSound.getVolume() == 100) {
            this.gotoAndStop("muteOffOverFrame");
        } else {
            this.gotoAndStop("muteOnOverFrame");
        }
    };
    mcTarget.volumeMC.onRollOut = mcTarget.volumeMC.onReleaseOutside=function () {
        if (videoSound.getVolume() == 100) {
            this.gotoAndStop("muteOffFrame");
        } else {
            this.gotoAndStop("muteOnFrame");
        }
    };
};
////
videoArrowBackwardRelease = function (mcTarget) {
    removeMovieClip(mcTarget._parent);
    //
    _parent._parent.menuItensHolderMC._visible = true;
    _root.arrowBackwardMC._visible = true;
    _root.arrowBackwardMC.gotoAndStop(2);
    //
    if (_root.arrowForwardMC._visible == false) {
        _root.arrowForwardMC._visible = false;
    }
    if (_root.arrowForwardMC._visible == true) {
        _root.arrowForwardMC._alpha = 100;
        _root.arrowForwardMC.enabled = true;
    }
};