Kann mir echt niemand weiterhelfen?
Guten Abend,
(und eins vorweg, ich habe mit CS4 gearbeitet, aber den präfix gibt es leider nicht)
ich habe mir vor ner ganzen Weile mal selbst einen Player zusammengeschustert, um damit selbstgedreht Interviews auf einer Internetseite zu veröffentlichen. Das klappt auch alles prima soweit. Allerdings möchte ich jetzt den Player so einstellen, dass eben kein Autostart mehr. Dafür habe ich schon mehrere Foren durchstöbert, bloß egal, was ich eingebe, es klappt einfach nicht. Deshalb meine Frage an euch:
Wo muss ich was eingeben, damit kein Autostart mehr ist?
Hier ist mein Code:
Ich hoffe, dass mir jemand weiterhelfen kann.Code:rewindButton._visible = false; tooltip._visible = false; var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); ns.setBufferTime(15); ns.onStatus = function(info) { if(info.code == "NetStream.Buffer.Full") { bufferClip._visible = false; } if(info.code == "NetStream.Buffer.Empty") { bufferClip._visible = true; } /*if(info.code == "NetStream.Play.Stop") { //doStop(); //ns.seek(0); } if(info.code == "NetStream.Buffer.Flush") { rewindButton._visible = true; //ns.seek(0); ns.pause(); }*/ if(info.code == "NetStream.Play.Stop") { rewindButton._visible = true; ns.seek(7); ns.pause(); } } theVideo.attachVideo(ns); ns.play("Vader-IV-09.flv"); // CONTROL BUTTONS //Stop stopButton.onRelease = function() { delete this.onEnterFrame; ns.seek(0); theVideo.clear(); ns.pause(); } // Play playButton.onRelease = function() { ns.pause(); } //Rewind rewindButton.onRelease = function() { ns.seek(0); ns.play("Vader-IV-09.flv"); rewindButton._visible = false; } // CONTROL BUTTONS///////////////// // AUDIO CONTROL FOR NETSTREAM: this.attachAudio(ns); var snd = new Sound(this); function setVol(v) { snd.setVolume(v); } function getVol() { return snd.getVolume(); } // AUDIO CONTROL ////////////// // MUTE _root.createEmptyMovieClip("vSound",_root.getNextHighestDepth()); vSound.attachAudio(ns); var so:Sound = new Sound(vSound); so.setVolume(100); mute.onRollOver = function() { if(so.getVolume() == 100) { this.gotoAndStop("onOver"); } else { this.gotoAndStop("muteOver"); } } mute.onRollOut = function() { if(so.getVolume() == 100) { this.gotoAndStop("on"); } else { this.gotoAndStop("mute"); } } mute.onRelease = function() { if(so.getVolume() == 100) { so.setVolume(0); this.gotoAndStop("muteOver"); } else { so.setVolume(100); this.gotoAndStop("onOver"); } } // MUTE /////////////// 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 * 170.6; loader.scrub._x = ns.time / duration * 170.6; } // Scrubber var scrubInterval; loader.scrub.onPress = function() { clearInterval(videoInterval); scrubInterval = setInterval(scrubit,10); this.startDrag(false,0,this._y,170.6,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/170.6)*duration)); } //Scrubber//////////////// //ContextMenu var theMenu:ContextMenu = new ContextMenu(); theMenu.hideBuiltInItems(); _root.menu = theMenu; var i1:ContextMenuItem = new ContextMenuItem(":::::::::::Whiskey-Soda::::::::::",trace); theMenu.customItems[0] = i1; var i2:ContextMenuItem = new ContextMenuItem("::::::::::::Play / Pause:::::::::::",pauseIt,treu); theMenu.customItems[1] = i2; var i3:ContextMenuItem = new ContextMenuItem("::::::::::::Replay Video::::::::::",replayIt); theMenu.customItems[2] = i3; var i4:ContextMenuItem = new ContextMenuItem(":::Copyright 2009 by WS_TF:::",trace); theMenu.customItems[3] = i4; function pauseIt() { ns.pause(); } function replayIt() { ns.seek(0); } // Contextmenu /////////////////// // CURRENT TIME var time_interval:Number = setInterval(checkTime, 500, ns); function checkTime(theVideo_ns:NetStream) { var ns_seconds:Number = theVideo_ns.time; var minutes:Number = Math.floor(ns_seconds/60); var seconds = Math.floor(ns_seconds%60) if (seconds<10) { seconds = ("0"+seconds); } time_txt.text = minutes+":"+seconds; } // CURRENT TIME ///////////////////// // DURATION ns.onMetaData = function(metadata) { duration = metadata.duration; var dur_seconds:Number = duration; var minutes_dspl = Math.floor(dur_seconds/60); var seconds_dspl = Math.floor(dur_seconds%60); if (minutes_dspl<10) { minutes_dspl = ("0"+minutes_dspl); } if (seconds_dspl<10) { seconds_dspl = ("0"+seconds_dspl); } duration_txt.text = minutes_dspl+":"+seconds_dspl; } // DURATION ///////////////////////// // FULLSCREEN fullscreen.onRelease = function() { if (Stage["displayState"] == "normal") { Stage["displayState"] = "fullScreen"; } else { Stage["displayState"] = "normal"; } } // FULLSCREEN /////////////////////////
Gruß
WS_TF
Kann mir echt niemand weiterhelfen?
Hallo,
dass einfachste wäre:
PHP-Code:theVideo.attachVideo(ns);
ns.play("Vader-IV-09.flv");
ns.pause();
Gruß
Wanderratte
Gebildet ist,
wer weiß,
wo er findet,
was er nicht weiß.
4bugs
Home
Amazon Wunschzettel
Funktioniert. Danke.
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)