Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 19-10-2006, 21:17   #1 (permalink)
Neuer User
 
Registriert seit: Sep 2001
Ort: cologne
Beiträge: 132
streaming videoplayer soll nicht loopen

hi craxx.

folgendes script zu einem streaming videoplayer funktioniert super.
mein problem ist nur eins: ich möchte nicht das wenn der flv durchgelaufen ist er wieder anfängt von vorne durchzulaufen.
er soll am anfang stoppen.

weiß nicht was ich einfügen muß damit der film nicht immer wieder im loop läuft.

bin für jede hilfe dankbar!!!!





PHP-Code:
stop();
var 
nc:NetConnection = new NetConnection();
nc.connect(null);

var 
ns:NetStream = new NetStream(nc);

theVideo.attachVideo(ns);

ns.setBufferTime(10);

ns.onStatus = function(info) {
    
trace(info.code);
    if(
info.code == "NetStream.Buffer.Full") {
        
bufferClip._visible false;
    }
    if(
info.code == "NetStream.Buffer.Empty") {
        
bufferClip._visible true;
    }
    if(
info.code == "NetStream.Play.Stop") {
        
ns.seek(0);
    }
}

ns.play("MUMIE35.flv");

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

rewindButton.onRelease = function() {
    
ns.seek(0);
    
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 500;
    
loader.scrub._x ns.time duration 490;
}

var 
scrubInterval;

loader.scrub.onPress = function() {
    
clearInterval(videoInterval);
    
scrubInterval setInterval(scrubit,0);
    
this.startDrag(false,0,this._y,490,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/500)*duration));
    
}
function 
pauseIt() {
    
ns.seek(0);
    
ns.pause();
}
function 
stopIt() {
    
ns.pause();

jandes ist offline   Mit Zitat antworten
Alt 20-10-2006, 05:38   #2 (permalink)
agedoubleju
Gast
 
Beiträge: n/a
PHP-Code:
if(info.code == "NetStream.Play.Stop") {
        
//ns.seek(0);
       
ns.pause(true);
    } 
  Mit Zitat antworten
Alt 20-10-2006, 10:06   #3 (permalink)
Neuer User
 
Registriert seit: Sep 2001
Ort: cologne
Beiträge: 132
jipieee. läuft! danke!!!
jandes ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 08:36 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele