1&1 Webhosting
Flashhilfe.de - Flash Community

Bräuchte Hilfe bei NetStream [Flash 8]

Forum > ActionScript 2.0 > Bräuchte Hilfe bei NetStream

 


AntwortenRegistrieren Seite1  

 19.03.2010, 10:56 
Beiträge: 6
Registriert: Jan 2009

Bräuchte Hilfe bei NetStream
Hi @ll ,

ich versuche (schon etwas länger ) eine Liste von Videos mit selbst erstellten Buttons der Titel via NetStream abspielen zu lassen.
Was mir fehlt sind die Zeilen damit , wenn Video 1 abgespielt wird und man Video 2 startet Video 1 gestoppt wird. Also wenn ein neues Video von der Liste per Button ausgewählt das andere stoppt.

codec bisher

PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?
var nc:NetConnection = new NetConnection (); 
nc.connect(null); 

// 1.Video 

var ns1:NetStream = new NetStream(nc); 
myVideo.attachVideo(ns1); 
netStream.setBufferTime(5); 

vid1_btn.onRelease = function(){ 
   
ns1.play("kinder_hamlet.flv"); 


//Video stoppen 
stop_btn.onRelease = function(){ 
   
ns1.pause(true); 


//Video abspielen 
play_btn.onRelease = function(){ 
   
ns1.pause(false); 



// 2. Video 

var ns2:NetStream = new NetStream(nc); 
myVideo.attachVideo(ns2); 
netStream.setBufferTime(5); 

vid2_btn.onRelease = function(){ 
   
ns2.play("musical2.flv"); 


//Video stoppen 
stop_btn.onRelease = function(){ 
   
ns2.pause(true); 


//Video abspielen 
play_btn.onRelease = function(){ 
   
ns2.pause(false); 
}
?>


Würde mich über guten lösungsvorschlag freuen


flockerl
 19.03.2010, 15:02Re1
Benutzerbild von skoda
Beiträge: 1151
Wohnort: Boston MA
Registriert: Feb 2006

ActionScript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
ns.onStatus = function(info) {
//buffer full hide bufferclip
if(info.code == "NetStream.Buffer.Full") {
   
   bufferClip._visible = false;

}

if(info.code == "NetStream.Buffer.Empty") {
   
   bufferClip._visible = true;

}
//if end goto beginning of vid
if(info.code == "NetStream.Play.Stop") {
   
   ns.seek(0);

}
}


if(info.code == "NetStream.Buffer.Full") {
   
   bufferClip._visible = false;
   

}


if(info.code == "NetStream.Buffer.Empty") {
   
   bufferClip._visible = false;
   _root.mc_container.bufferClip._alpha = 100;
   //_root.mc_bufferFace._alpha = 100;
   trace("VIDEO NOT LOADED");

}

//////END OF VIDEO
//if end goto beginning of vid

if(info.code == "NetStream.Play.Stop") {
   trace("STOP ME NOW");
   
    _root.mc_container.bufferClip._alpha = 0;
   //ns.seek(0); back to beginn
   ns.pause();
   tweenReplay();
   

   


   
   
}


}
no one died when clinton lied
 19.03.2010, 15:39Re2
Beiträge: 6
Registriert: Jan 2009

Themenautor/in

Hi skoda,

schonmal danke für die Antwort aber das versteh ich net.  Habe jetz schon eine Lösung zur Hilfe gestellt bekommen was das stoppen des  Video1 angeht wenn das Video2 spielt, das funktioniert auch prima.

PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?
var film1Playing:Boolean false;
var 
film2Playing:Boolean false;


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

var 
ns1:NetStream = new NetStream(nc);
myVideo.attachVideo(ns1);
netStream.setBufferTime(5);

vid1_btn.onRelease = function(){
if(
film2Playingns2.close();
ns1.play("kinder_hamlet.flv"); 
film1Playing true;
}

//Video stoppen 
stop_btn.onRelease = function(){ 
ns1.pause(true); 


//Video abspielen 
play_btn.onRelease = function(){ 
ns1.pause(false); 
}


var 
ns2:NetStream = new NetStream(nc);
myVideo.attachVideo(ns2);
netStream.setBufferTime(5);

vid2_btn.onRelease = function(){
if(
film1Playingns1.close();
ns2.play("musical2.flv"); 
film2Playing true;
}


//Video stoppen 
stop_btn.onRelease = function(){ 
ns2.pause(true); 


//Video abspielen 
play_btn.onRelease = function(){ 
ns2.pause(false); 
}
?>


aber jetz gibs noch ein kleines Problemchen : Mir scheint als wenn der Codec von unten nach oben gelesen wird. Das heisst die play/ stop Funktion funktioniert nur bei Video2 nich bei Video1. Wenn ich den Codec von Video2 wegmache gehts bei Video1 aber doch (play/stop).

und wenn ich Video1 anklicke spielt nur der Ton kein Bild, von Video2 spielt Bild mit Ton. Mache ich den Codec von Video2 weg dann kommt auch Bild und ton von video1, was mache ich denn da falsch ?



grüße

flockerl
Geändert von flockerl am 19.03.10 um 15:46 Uhr

 
nicht sichtbar bei eingeloggten Mitgliedern
 20.03.2010, 17:40Re3
Beiträge: 6
Registriert: Jan 2009

Themenautor/in

Problem gelöst !!!


PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var film1Playing:Boolean = false;
var film2Playing:Boolean = false;


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

var ns:NetStream = new NetStream(nc);
myVideo.attachVideo(ns);

vid1_btn.onRelease = function(){
    if(film2Playing) ns.close();
    ns.play("kinder_hamlet.flv"); 
    film1Playing = true;
}


vid2_btn.onRelease = function(){
    if(film1Playing) ns.close();
    ns.play("musical2.flv"); 
    film2Playing = true;
}


//Video stoppen 
stop_btn.onRelease = function(){ 
    ns.pause(true); 


//Video abspielen 
play_btn.onRelease = function(){ 
    ns.pause(false); 
}


thx for help
 
Themen
Ähnliche Beiträge zum Thema
Net Stream - gottoandplay [Flash 9] 14.07.2010 - robertochampa
 

AntwortenRegistrieren Seite1  

Schnellantwort

Du musst registriert sein, um diese Funktion nutzen zu können.
Partner Webseiten: DesignerInAction.de   Designnation.de   Mediengestalter.info   php-resource.de   phpforum.de   phpwelt.de   Pixelio.de   PSD-Tutorials.de   Tutorials.de

Haftungsausschluss   Datenschutzerklärung   Hier Werben   Impressum
© 1999-2012 Sebastian Wichmann - Flashhilfe.de