Habe eine Seite mit diversen Videos.
- 1 Monitorfeld
- 3 Textinfofelder (duration, titel, genre)
- 3 Buttons (Play, Zurück, Vorwärts)
Wenn man auf Play klickt, soll das erste Video abgespielt werden. Wenn man "vorwärts" anklickt jeweils das nächste (also wenn 1 läuft soll 2 gespielt weren, wenn 2 läuft 3, etc.) Bei Rückwärts soll alles umgekehrt laufen, sprich jeweils das vorherige.
Ich mache das momentan sehr umständlich folgendermaßen:
Frame 1:
PHP-Code:
_root.p_mc.videoDesign_mc._visible = true;
_root.p_mc.videoDesignInfo_mc._visible = false;
_root.p_mc.soundOnOff_mc._visible = false;
var netConn:NetConnection = new NetConnection();
netConn.connect(null);
var netStreamSound:NetStream = new NetStream(netConn);
soundVideo_flv.attachVideo(netStreamSound);
netStreamSound.setBufferTime(5);
netStreamSound.pause(true);
_root.p_mc.sound_mc.soundPlay_btn.onRelease = function() {
trace("soundPlay_btn");
_root.p_mc.videoSound_mc._visible = true;
_root.p_mc.videoSoundInfo_mc._visible = true;
_root.p_mc.soundOnOff_mc._visible = true;
_root.p_mc.videoSoundInfo_mc.gotoAndStop("1");
netStreamSound.seek(0);
netStreamSound.pause(false);
netStreamSound.play("FLV/Film1.flv");
};
_root.p_mc.sound_mc.soundNext_btn.onRelease = function() {
_root.p_mc.videoSoundInfo_mc.gotoAndStop("2");
trace("soundNext_btn");
gotoAndStop("2");
};
_root.p_mc.sound_mc.soundPrev_btn.onRelease = function() {
_root.p_mc.videoSoundInfo_mc.gotoAndStop("2");
trace("soundPrevy_btn");
gotoAndStop("2");
};
trace("f1");
stop();
Frame 2:
PHP-Code:
var netConn:NetConnection = new NetConnection();
netConn.connect(null);
var netStreamSound:NetStream = new NetStream(netConn);
soundVideo_flv.attachVideo(netStreamSound);
netStreamSound.setBufferTime(5);
netStreamSound.play("FLV/film2.flv");
_root.p_mc.sound_mc.soundPlay_btn.onRelease = function() {
trace("soundPlay_btn");
netStreamSound.seek(0);
netStreamSound.pause(false);
netStreamSound.play("FLV/film2.flv");
};
_root.p_mc.sound_mc.soundNext_btn.onRelease = function() {
_root.p_mc.videoSoundInfo_mc.gotoAndStop("1");
trace("soundNext_btn");
gotoAndStop("3");
};
_root.p_mc.sound_mc.soundPrev_btn.onRelease = function() {
_root.p_mc.videoSoundInfo_mc.gotoAndStop("1");
trace("soundPrev_btn");
gotoAndStop("3");
};
trace("f2");
stop();
Frame3:
PHP-Code:
var netConn:NetConnection = new NetConnection();
netConn.connect(null);
var netStreamSound:NetStream = new NetStream(netConn);
soundVideo_flv.attachVideo(netStreamSound);
netStreamSound.setBufferTime(5);
netStreamSound.play("FLV/film3.flv");
_root.p_mc.sound_mc.soundPlay_btn.onRelease = function() {
trace("soundPlay_btn");
netStreamSound.seek(0);
netStreamSound.pause(false);
netStreamSound.play("FLV/film3.flv");
};
_root.p_mc.sound_mc.soundNext_btn.onRelease = function() {
_root.p_mc.videoSoundInfo_mc.gotoAndStop("2");
trace("soundNext_btn");
gotoAndStop("2");
};
_root.p_mc.sound_mc.soundPrev_btn.onRelease = function() {
_root.p_mc.videoSoundInfo_mc.gotoAndStop("2");
trace("soundPrev_btn");
gotoAndStop("2");
};
trace("f3");
stop();
Wie vereinfache ich das am besten?
Vielen Dank im Voraus!