сброс плеера после воспроизведения видео - PullRequest
0 голосов
/ 30 марта 2011

не смог добавить весь код раньше. по существу, после воспроизведения фильма я хочу, чтобы swf восстановил свой первый исходный кадр загрузки.


function stopVideo()
{
    showPlayBtn(true);
    Tweener.addTween(videocontrols.stopBtn, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
    myStream.stop();
    myStream.seek(0);
    myStream.pause(true);
    if (playOnStart == "true")
    {
        if (!imgHolder.holder)
        {
            loadImage();
        }
        else
        {
            Tweener.addTween(imgHolder.bmp, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
        } // end else if
    }
    else
    {
        Tweener.addTween(imgHolder.bmp, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
    } // end else if
    videocontrols.playBtn.gotoAndStop(1);
    updateInformation(true);
} // End of the function
function playVideo()
{
    if (timeOfPause && timeOfPause > 0)
    {
        if (tempVideo != myVideo)
        {
            myStream.seek(0);
        } // end if
        myStream.pause(false);
        tempVideo = myVideo;
    }
    else
    {
        if (tempVideo != myVideo)
        {
            myStream.seek(0);
        } // end if
        myStream.play(myVideo);
        tempVideo = myVideo;
    } // end else if
    Tweener.addTween(imgHolder.bmp, {_alpha: 0, time: 4.000000E-001, transition: "easeOutCubic"});
    videocontrols.playBtn.gotoAndStop(2);
    playBtn._visible = false;
} // End of the function
function startVideo()
{
    myStream.seek(0);
    myStream.play(myVideo);
    tempVideo = myVideo;
    videocontrols.playBtn.gotoAndStop(2);
    playBtn._visible = false;
}// End of the function</p>

<p>Stage.align = "TL";
Stage.scaleMode = "noScale";
setProperty("", _quality, "HIGH");
Stage.displayState = "normal";
ASVideoPlayer._visible = false;
ASVideoPlayer._width = Stage.width;
ASVideoPlayer._height = Stage.height;
playBtn._visible = false;
playBtn._alpha = 0;
videocontrols.progressMC.progressBar._width = 0;
videocontrols.progressMC.loadingBar._width = 0;
errorMC._alpha = 0;
bufferingMC._alpha = 0;
defaultVideo = _parent.defaultVideo;
image = _parent.image;
logo = _parent.logo;
logoLink = _parent.logoLink;
logoTarget = _parent.logoTarget;
playOnStart = _parent.autoplay;
startVolume = _parent.videoVolume;
fitToPlayer = true;
bufferSize = 5;
protection = false;
domain = "as-flash.com";
doubleClickEnable = true;
doubleClickTime = 250;
checkFlashPlayerVersion = true;
FlashPlayerDownloadLink = "http://www.adobe.com/products/flashplayer/";
useKeyboardShortcuts = true;
keyVideoSeek = 5;
mouseWheelEnabled = true;
keyVideoVolume = 5;
logoX = 10;
logoY = 10;
HDbuttonX = 10;
HDbuttonY = 10;
imageLoaderX = 25;
imageLoaderY = 25;
if (!defaultVideo)
{
    defaultVideo = 1;
} // end if
if (!startVolume)
{
    startVolume = 50;
} // end if
if (!playOnStart)
{
    playOnStart = "false";
} // end if
var newConnection = new NetConnection();
newConnection.connect("");
var myStream = new NetStream(newConnection);
myStream.setBufferTime(bufferSize);
mediaDisplay.attachVideo(myStream);
if (!soundMC)
{
    this.createEmptyMovieClip("soundMC", this.getNextHighestDepth());
} // end if
soundMC.attachAudio(myStream);
var soundVolume = new Sound(soundMC);
soundVolume.setVolume(startVolume);
videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = startVolume / 100 * videocontrols.volumeMC.backgroundMC._width;
startPlayer = function ()
{
    memPositions();
    resizePlayer();
    if (videoLinkHD.length > 3)
    {
        flashPlayerVersionCheck();
    } // end if
    if (videoLink.length > 3 && videoLinkHD.length > 3)
    {
        this.attachMovie("QualityIcon", "QualityIcon", this.getNextHighestDepth());
        QualityIcon._x = videoArea._width - QualityIcon._width - HDbuttonX;
        QualityIcon._y = HDbuttonY;
        QualityIcon.gotoAndStop(defaultVideo);
        if (defaultVideo == "1")
        {
            myVideo = videoLink;
        }
        else
        {
            myVideo = videoLinkHD;
        } // end else if
        QualityIcon.onRollOver = function ()
        {
            Tweener.addTween(this, {_alpha: 80, time: 4.000000E-001, transition: "easeOutCubic"});
        };
        QualityIcon.onRollOut = function ()
        {
            Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
        };
        QualityIcon.onPress = function ()
        {
            myStream.close();
            mediaDisplay.clear();
            Tweener.addTween(videocontrols.progressMC.progressBar, {_width: 0, time: 1, transition: "easeOutCubic"});
            Tweener.addTween(videocontrols.progressMC.posMC, {_x: 0, time: 1, transition: "easeOutCubic"});
            if (this._currentframe == 1)
            {
                myVideo = videoLinkHD;
                flashPlayerVersionCheck();
                this.gotoAndStop(2);
            }
            else
            {
                myVideo = videoLink;
                this.gotoAndStop(1);
            } // end else if
            tempVideo = myVideo;
            myStream.play(myVideo);
            if (videocontrols.playBtn._currentframe == 1)
            {
                myStream.seek(0);
                myStream.pause(true);
                Tweener.addTween(bufferingMC, {_alpha: 0, time: 6.000000E-001, transition: "easeOutCubic"});
                loadImage();
            }
            else
            {
                Tweener.addTween(bufferingMC, {_alpha: 100, time: 6.000000E-001, transition: "easeOutCubic"});
                myStream.seek(0);
                myStream.pause(false);
            } // end else if
            Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
        };
    } // end if
    if (playOnStart == "true")
    {
        videocontrols.playBtn.gotoAndStop(2);
        myStream.play(myVideo);
        tempVideo = myVideo;
        Tweener.addTween(bufferingMC, {_alpha: 100, time: 6.000000E-001, transition: "easeOutCubic"});
        updateInformation(false, "buffering");
    }
    else
    {
        updateInformation(true);
        if (image.length > 0)
        {
            loadImage();
        } // end if
        videocontrols.playBtn.gotoAndStop(1);
    } // end else if
    if (logo.length > 3)
    {
        if (!logoMC)
        {
            this.createEmptyMovieClip("logoMC", this.getNextHighestDepth());
        } // end if
        logo_loader.loadClip(logo, logoMC);
    } // end if
};
memPositions = function ()
{
    screenW = Stage.width;
    screenH = Stage.height;
    videocontrolsX = videocontrols._x;
    playBtnX = videocontrols.playBtn._x;
    playBtnY = videocontrols.playBtn._y;
    stopBtnX = videocontrols.stopBtn._x;
    stopBtnY = videocontrols.stopBtn._y;
    progressMCX = videocontrols.progressMC._x;
    progressMCY = videocontrols.progressMC._y;
    progressMCW = videocontrols.progressMC._width;
    outputMCX = Stage.width - 200;
    outputMCY = videocontrols.outputMC._y;
    volumeonoffMCX = Stage.width - 104;
    volumeonoffMCY = videocontrols.audioOnOff._y;
    volumeMCX = Stage.width - 89;
    volumeMCY = videocontrols.volumeMC._y;
    volumeMCW = videocontrols.volumeMC._width;
    fitToPlayerBtnX = Stage.width - 31;
    fitToPlayerBtnY = videocontrols.fitToPlayerBtn._y;
    fullscreenBtnX = Stage.width - 13;
    fullscreenBtnY = videocontrols.fullscreenBtn._y;
    videocontrols.progressMC.backgroundMC._width = Stage.width - videocontrols.progressMC._x - (Stage.width - videocontrols.outputMC._x) - 15;
    videocontrols.progressMC.loadingBar._width = pctLoaded * videocontrols.progressMC.backgroundMC._width;
    videocontrols.progressMC.outlineMC._width = videocontrols.progressMC.backgroundMC._width * 1.005000E+000;
};
myStream.onStatus = function (status)
{
    errorMC._alpha = 0;
    if (status.code == "NetStream.Play.Start")
    {
        preloadVideo();
        playingVideo = true;
        updateInformation(true);
        resizeVideo();
    } // end if
    if (status.code == "NetStream.Play.Stop")
    {
        Tweener.addTween(imgHolder.bmp, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
        playingVideo = false;
        updateInformation(false);
        progressMC.progressBar._width = 0;
    } // end if
    if (status.code == "NetStream.Play.StreamNotFound" || status.code == "NetStream.Play.FileStructureInvalid" || status.code == "NetStream.Play.NoSupportedTrackFound")
    {
        playingVideo = false;
        progressMC.progressBar._width = 0;
        videocontrols.playBtn.gotoAndStop(1);
        errorMC._alpha = 100;
        Tweener.addTween(bufferingMC, {_alpha: 0, time: 6.000000E-001, transition: "easeOutCubic"});
    } // end if
    if (status.code == "NetStream.Buffer.Empty")
    {
        Tweener.addTween(bufferingMC, {_alpha: 100, time: 6.000000E-001, transition: "easeOutCubic"});
    } // end if
    if (status.code == "NetStream.Buffer.Full")
    {
        Tweener.addTween(bufferingMC, {_alpha: 0, time: 6.000000E-001, transition: "easeOutCubic"});
        updateInformation(true);
    } // end if
    if (status.code == "NetStream.Seek.Notify")
    {
    } // end if
    if (status.code == "NetStream.Seek.InvalidTime")
    {
    } // end if
};
myStream.onMetaData = function (obj)
{
    videoDuration = obj.duration;
};
preloadVideo = function ()
{
    if (!preloaderMC)
    {
        this.createEmptyMovieClip("preloaderMC", this.getNextHighestDepth());
    } // end if
    preloaderMC.onEnterFrame = function ()
    {
        pctLoaded = myStream.bytesLoaded / myStream.bytesTotal;
        videocontrols.progressMC.loadingBar._width = pctLoaded * videocontrols.progressMC._width - 1;
        if (pctLoaded >= 1)
        {
            pctLoaded = 1;
            videocontrols.progressMC.loadingBar._width = videocontrols.progressMC.backgroundMC._width;
            delete preloaderMC.onEnterFrame;
        } // end if
    };
};
updateInformation = function (stat, msg)
{
    clearInterval(updateInterval);
    if (myStream.time >= 0)
    {
        resizeVideo();
    } // end if
    if (stat == true)
    {
        this.onEnterFrame = function ()
        {
            videocontrols.progressMC.progressBar._width = videocontrols.progressMC.posMC._x = myStream.time / videoDuration * videocontrols.progressMC._width;
            if (!msg)
            {
                videocontrols.outputMC.outputTF.text = outputTime(myStream.time, videoDuration);
            }
            else
            {
                videocontrols.outputMC.outputTF.text = msg;
            } // end else if
            if (Math.round(myStream.time) == Math.round(videoDuration))
            {
                videocontrols.playBtn.gotoAndStop(1);
                Tweener.addTween(imgHolder.bmp, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
                showPlayBtn(true);
                timeOfPause = 0;
                myStream.seek(0);
                myStream.pause(true);
                videocontrols.outputMC.outputTF.text = outputTime(timeOfPause, videoDuration);
                videocontrols.progressMC.progressBar._width = 0;
                delete this.onEnterFrame;
            } // end if
        };
    }
    else if (msg)
    {
        outputMC.outputTF.text = msg;
    }
    else
    {
        outputMC.outputTF.text = "";
    } // end else if
};
outputTime = function (curTime, totTime)
{
    curMinutes = Math.floor(curTime / 60);
    curSeconds = Math.floor(curTime % 60);
    totMinutes = Math.floor(totTime / 60);
    totSeconds = Math.floor(totTime % 60);
    if (!totMinutes || totMinutes == undefined)
    {
        totMinutes = 0;
    } // end if
    if (!totSeconds || totSeconds == undefined)
    {
        totSeconds = 0;
    } // end if
    if (curMinutes < 10)
    {
        curMinutes = "0" + curMinutes;
    } // end if
    if (curSeconds < 10)
    {
        curSeconds = "0" + curSeconds;
    } // end if
    if (totMinutes < 10)
    {
        totMinutes = "0" + totMinutes;
    } // end if
    if (totSeconds < 10)
    {
        totSeconds = "0" + totSeconds;
    } // end if
    return (curMinutes + ":" + curSeconds + " / " + totMinutes + ":" + totSeconds);
};
videocontrols.playBtn.onRollOver = function ()
{
    Tweener.addTween(this, {_alpha: 70, time: 4.000000E-001, transition: "easeOutCubic"});
    if (this._currentframe == 1)
    {
        updateInformation(true, "PLAY");
    }
    else
    {
        updateInformation(true, "PAUSE");
    } // end else if
};
videocontrols.playBtn.onRollOut = function ()
{
    Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
    updateInformation(true);
};
videocontrols.playBtn.onPress = function ()
{
    Tweener.addTween(this, {_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
    if (this._currentframe == 1)
    {
        showPlayBtn(false);
        if (timeOfPause && timeOfPause > 0)
        {
            myStream.pause(false);
        }
        else
        {
            if (tempVideo != myVideo)
            {
                myStream.seek(0);
            } // end if
            myStream.play(myVideo);
            tempVideo = myVideo;
        } // end else if
        this.gotoAndStop(2);
    }
    else
    {
        showPlayBtn(true);
        timeOfPause = myStream.time;
        myStream.pause(true);
        Tweener.addTween(bufferingMC, {_alpha: 100, time: 6.000000E-001, transition: "easeOutCubic"});
        this.gotoAndStop(1);</p>

<pre><code>    var trackingURL = "";


    var trackInfo = new LoadVars();
    trackInfo.value1 = myVideo;
    trackInfo.value2 = "";


    var myDate = new Date();
    trackInfo.sendAndLoad(trackingURL + "?cacheKiller=" + (myDate.UTC), (trackInfo), "POST");
} // end else if
Tweener.addTween(imgHolder.bmp, {_alpha: 0, time: 4.000000E-001, transition: "easeOutCubic"});
updateInformation(true);

var trackingURL = "";


    var trackInfo = new LoadVars();
    trackInfo.value1 = myVideo;
    trackInfo.value2 = "";


    var myDate = new Date();
    trackInfo.sendAndLoad(trackingURL + "?cacheKiller=" + (myDate.UTC), (trackInfo), "POST");

}; videocontrols.stopBtn.onRollOver = function () { Tweener.addTween (this, {_alpha: 70, время: 4.000000E-001, переход: "easeOutCubic"}); updateInformation (true, "STOP"); }; videocontrols.stopBtn.onRollOut = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); updateInformation (истина); }; videocontrols.stopBtn.onPress = function () { stopVideo (); }; videocontrols.fullscreenBtn.onRollOver = function () { Tweener.addTween (this, {_alpha: 70, время: 4.000000E-001, переход: "easeOutCubic"}); если (this._currentframe == 1) { updateInformation (true, "fullscreen"); } еще { updateInformation (true, «обычный экран»); } // конец еще, если }; videocontrols.fullscreenBtn.onRollOut = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); updateInformation (истина); }; videocontrols.fullscreenBtn.onPress = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); ratio = mediaDisplay.width / mediaDisplay.height; если (this._currentframe == 1) { Stage.displayState = "fullScreen"; this.gotoAndStop (2); videoArea._width = Stage.width; videoArea._height = ASVideoPlayer._height - videocontrols._height; videoArea._x = videoArea._y = 0; } еще { Stage.displayState = "normal"; videoArea._width = Stage.width; videoArea._height = ASVideoPlayer._height - videocontrols._height; videoArea._x = videoArea._y = 0; this.gotoAndStop (1); } // конец еще, если updateInformation (истина); изменить размер видео(); resizePlayer (); var trackingURL = "";

    var trackInfo = new LoadVars();
    trackInfo.value1 = myVideo;
    trackInfo.value2 = "";


    var myDate = new Date();
    trackInfo.sendAndLoad(trackingURL + "?cacheKiller=" + (myDate.UTC), (trackInfo), "POST");

}; videocontrols.fitToPlayerBtn.onRollOver = function () { Tweener.addTween (this, {_alpha: 70, время: 4.000000E-001, переход: "easeOutCubic"}); если (this._currentframe == 1) { updateInformation (true, «подходит игроку»); } еще { updateInformation (true, "оригинальный размер"); } // конец еще, если }; videocontrols.fitToPlayerBtn.onRollOut = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); updateInformation (истина); }; videocontrols.fitToPlayerBtn.onPress = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); if (fitToPlayer == false) { fitToPlayer = true; this.gotoAndStop (2); } еще { fitToPlayer = false; this.gotoAndStop (1); } // конец еще, если updateInformation (истина); изменить размер видео(); }; videocontrols.progressMC.backgroundMC.onRollOver = function () { Tweener.addTween (this, {_alpha: 70, время: 4.000000E-001, переход: "easeOutCubic"}); updateInformation (true, "искать видео"); }; videocontrols.progressMC.backgroundMC.onRollOut = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); updateInformation (истина); }; videocontrols.progressMC.backgroundMC.onPress = function () { Tweener.addTween (this, {_alpha: 70, время: 4.000000E-001, переход: "easeOutCubic"}); updateInformation (истина); myStream.pause (истина); this.onEnterFrame = function () { if (this._parent._xmouse> = 0 && this._parent._xmouse <= this._width) { seekTime = this._parent._xmouse / this._width * videoDuration; videocontrols.progressMC.progressBar._width = seekTime / videoDuration * videocontrols.progressMC._width; myStream.seek (seekingTime); если (seekTime == videoDuration) { myStream.pause (истина); } // конец, если } // конец, если }; };videocontrols.progressMC.backgroundMC.onRelease = videocontrols.progressMC.backgroundMC.onReleaseOutside = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); if (videocontrols.playBtn._currentframe == 1) { myStream.pause (истина); } еще { myStream.pause (ложь); } // конец еще, если timeOfPause = myStream.time; updateInformation (истина); удалите this.onEnterFrame; }; videocontrols.volumeMC.backgroundMC.onRollOver = function () { Tweener.addTween (this, {_alpha: 70, время: 4.000000E-001, переход: "easeOutCubic"}); updateInformation (true, «настроить громкость»); }; videocontrols.volumeMC.backgroundMC.onRollOut = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); updateInformation (истина); }; videocontrols.volumeMC.backgroundMC.onPress = function () { Tweener.addTween (this, {_alpha: 70, время: 4.000000E-001, переход: "easeOutCubic"}); this.onEnterFrame = function () { if (this._xmouse> = 0 && this._xmouse <= this._width) { seekVolume = this._xmouse / this._width * 100; videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = this._xmouse; soundVolume.setVolume (seekingVolume); dispTF = "volume:" + Math.round (seekVolume) + "%"; updateInformation (true, dispTF); if (seekVolume == 0) { videocontrols.audioOnOff.gotoAndStop (2); } еще { videocontrols.audioOnOff.gotoAndStop (1); } // конец, если } // конец еще, если }; }; videocontrols.volumeMC.backgroundMC.onRelease = videocontrols.volumeMC.backgroundMC.onReleaseOutside = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); updateInformation (истина); удалите this.onEnterFrame; }; updateVolumePosition = function () { videocontrols.volumeMC.posMC._x = videocontrols.volumeMC.volBar._width; soundVolume.setVolume (videocontrols.volumeMC.volBar._width / videocontrols.volumeMC.backgroundMC._width * 100); }; if (useKeyboardShortcuts == true) { keylistener = new Object (); keylistener.onKeyDown = function () { clearInterval (UpdateInterval); if (Key.isDown (13)) { if (Stage.displayState == "нормальный") { Stage.displayState = "fullScreen"; ASVideoPlayer._width = Stage.width; ASVideoPlayer._height = Stage.height; videocontrols.fullscreenBtn.gotoAndStop (2); } еще { Stage.displayState = "normal"; ASVideoPlayer._width = screenW; ASVideoPlayer._height = screenH; videocontrols.fullscreenBtn.gotoAndStop (1); } // конец, если } // конец еще, если if (Key.isDown (27)) { Stage.displayState = "normal"; ASVideoPlayer._width = screenW; ASVideoPlayer._height = screenH; videocontrols.fullscreenBtn.gotoAndStop (1); } // конец, если if (Key.isDown (32)) { if (videocontrols.playBtn._currentframe == 1) { showPlayBtn (ложь); if (timeOfPause && timeOfPause> 0) { myStream.pause (ложь); } еще { myStream.play (MyVideo); } // конец еще, если videocontrols.playBtn.gotoAndStop (2); } еще { showPlayBtn (истина); timeOfPause = myStream.time; myStream.pause (истина); videocontrols.playBtn.gotoAndStop (1); } // конец, если } // конец еще, если if (Key.isDown (39)) {gotoTime = myStream.time + keyVideoSeek;if (gotoTime 0) {myStream.seek (gotoTime);} else {myStream.seek (0);} // end if} // end else if if (Key.isDown (38)) {gotoVolume = videocontrols.volumeMC.volBar._width / videocontrols.volumeMC.backgroundMC._width * 100 + keyVideoVolume;videocontrols.audioOnOff.gotoAndStop (1);if (gotoVolume <100) {videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = gotoVolume / 100 * videocontrols.volumeMC.backgroundMC._width;soundVolume.setVolume (gotoVolume);} else {gotoVolume = 100;videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = videocontrols.volumeMC.backgroundMC._width;soundVolume.setVolume (100);} // конец еще, если dispTF = "volume:" + Math.round (gotoVolume) + "%";updateInformation (true, dispTF);} // конец if if (Key.isDown (40)) {gotoVolume = videocontrols.volumeMC.volBar._width / videocontrols.volumeMC.backgroundMC._width * 100 - keyVideoVolume;if (gotoVolume> 0) {videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = gotoVolume / 100 * videocontrols.volumeMC.backgroundMC._width;soundVolume.setVolume (gotoVolume);} else {gotoVolume = 0;videocontrols.volumeMC.volBar._width = videocontrols.volumeMC.posMC._x = 0;videocontrols.audioOnOff.gotoAndStop (2);soundVolume.setVolume (0);} // конец еще, если dispTF = "volume:" + Math.round (gotoVolume) + "%";updateInformation (true, dispTF);} // end if updateInterval = setInterval (update, 1000);};Key.addListener (KeyListener);} // конец if update = function () {updateInformation (true);};

videocontrols.onEnterFrame = function () {resizeVideo ();resizePlayer ();resizeImage ();};flashPlayerVersionCheck = function () {if (checkFlashPlayerVersion == true) {var _loc4 = System.capabilities.version;var _loc3 = _loc4.split ("");var _loc2 = _loc3 [1] .split (",");if (_loc2 [0]> = 10) {HDsupport = true;} else if (_loc2 [0]> = 9 && _loc2 [1]> = 0 && _loc2 [2]> = 115 && _loc2 [3]> = 0) {HDsupport = true;} else {HDsupport = false;} // заканчиваем, если if (HDsupport == false) {errorMC._alpha = 0;bufferingMC._alpha = 0;if (! downloadWindow) {this.attachMovie ("downloadWindow", "downloadWindow", this.getNextHighestDepth ());} // end if downloadWindow._x = videoArea._width / 2;downloadWindow._y = videoArea._height / 2;downloadWindow.closeBtn.onRollOver = downloadWindow.downloadBtn.onRollOver = function () {Tweener.addTween (this, {_alpha: 40, time: 4.000000E-001, переход: "easeOutCubic"});};downloadWindow.closeBtn.onRollOut = downloadWindow.downloadBtn.onRollOut = function () {Tweener.addTween (this, {_alpha: 100, time: 4.000000E-001, переход: "easeOutCubic"});};downloadWindow.closeBtn.onRelease = downloadWindow.closeBtn.onReleaseOutside = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); downloadWindow.removeMovieClip (); }; downloadWindow.downloadBtn.onRelease = downloadWindow.downloadBtn.onReleaseOutside = function () { Tweener.addTween (this, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); getURL (FlashPlayerDownloadLink, "_blank"); downloadWindow.removeMovieClip (); }; } // конец, если } // конец, если }; loadImage = function () { if (! imgHolder.holder) { imgHolder.createEmptyMovieClip ("holder", imgHolder.getNextHighestDepth ()); } // конец, если если (! imgHolder.bmp) { imgHolder.createEmptyMovieClip ("bmp", imgHolder.getNextHighestDepth ()); } // конец, если imgHolder.holder._visible = false; imgHolder.bmp._visible = false; image_loader.loadClip (image, imgHolder.holder); }; showPlayBtn = function (stat) { if (stat == true) { playBtn._visible = true; playBtn._alpha = 0; playBtn._xscale = playBtn._yscale = 130; Tweener.addTween (playBtn, {_alpha: 100, время: 4.000000E-001, переход: "easeOutCubic"}); Tweener.addTween (playBtn, {_xscale: 100, _yscale: 100, время: 4.000000E-001, переход: "easeOutCubic"}); } еще { playBtn._visible = false; playBtn._alpha = 0; } // конец еще, если playBtn.onRollOver = function () { this._alpha = 80; }; playBtn.onRollOut = function () { this._alpha = 100; }; playBtn.onPress = function () { проиграть видео(); }; }; если (защита == правда) { protocol = _url.substr (0, _url.indexOf (":")); if (protocol == "file") { startPlayer (); } еще, если (_url.indexOf (домен)> 0) { startPlayer (); } еще { videocontrols._visible = false; myStream.close (); this.attachMovie ("protectionMC", "protectionMC", this.getNextHighestDepth ()); protectionMC._alpha = 0; protectionMC._x = Stage.width / 2; protectionMC._y = Stage.height / 2; Tweener.addTween (protectionMC, {_alpha: 100, время: 6.000000E-001, переход: "easeOutCubic"}); } // конец еще, если } еще { startPlayer (); } // конец еще, если

1 Ответ

0 голосов
/ 30 марта 2011

Не видя, что находится на временной шкале мувиклипа, действительно трудно сказать.Мне тоже немного неясно, что вы подразумеваете под загрузкой по умолчанию?Проигрыватель и загрузчик должны быть уменьшены до ширины 0, или должен быть сброшен целый набор переменных.

В любом случае, эти две строки (вы, вероятно, уже разобрались с этой) - это то, что вам нужно

videocontrols.progressMC.progressBar._width = 0;
videocontrols.progressMC.loadingBar._width = 0;

Кажется, это строки 73 и 74. Я не смог найти никаких функций, которые вызываются во время воспроизведения видео или когда видео заканчивается.Если таковые имеются, тогда позвоните тем, кто там.Если нет, то добавьте один.Требуемый обработчик состояния: NetStream.onStatus ( ссылка )

...