Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 18-07-2005, 13:38   #1 (permalink)
Neuer User
 
Registriert seit: Aug 2002
Beiträge: 75
aus listbox videos und mehr aufrufen???

Moin.

folgendes hab nen flv-player aus nem super tutorial von .....nachgebaut. das funktioniert so, dass die auswahl eines videos über ne listbox läuft. die einträge din der listbox werden wiederum aus ner xml-datei eingelesen. meine frage ist nun, wie kann ich ne eintrag zusätzlich noch die anweisung geben, dass er ein neues textfeld anzeigt, in dem in dann infos zum jeweiligen clip schreiben kann. es muss nicht unbedingt ein textfeld sein. ich kann ja auch ein movieclip einblenden.

hier nochmal das gesamte codingdenke, das fettgedruckte ist ja der befehl an die xml-datei. da such ich nun ein scripting, dass gleichzeitig im flashfilm ein textfeld mit infos aufruft!!!)

Dannnkeee!!!!

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

var ns:NetStream = new NetStream(nc);

theVideo.attachVideo(ns);

ns.setBufferTime(10);

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") {
ns.seek(0);
}
}

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

rewindButton.onRelease = function() {
ns.seek(0);
}

this.createEmptyMovieClip("vFrame",this.getNextHig hestDepth());
vFrame.onEnterFrame = videoStatus;

var amountLoaded:Number;
var duration:Number;

ns["onMetaData"] = function(obj) {
duration = obj.duration;
}

function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 208.9;
loader.scrub._x = ns.time / duration * 208.9;
}

var scrubInterval;

loader.scrub.onPress = function() {
vFrame.onEnterFrame = scrubit;
this.startDrag(false,0,this._y,208,this._y);
}

loader.scrub.onRelease = loader.scrub.onReleaseOutside = function() {
vFrame.onEnterFrame = videoStatus;
this.stopDrag();
}

function scrubit() {
ns.seek(Math.floor((loader.scrub._x/208)*duration));
}

var theMenu:ContextMenu = new ContextMenu();
theMenu.hideBuiltInItems();
_root.menu = theMenu;

var item1:ContextMenuItem = new ContextMenuItem("::::: Video Controls :::::",trace);
theMenu.customItems[0] = item1;

var item2:ContextMenuItem = new ContextMenuItem("Play / Pause Video",pauseIt,true);
theMenu.customItems[1] = item2;

var item3:ContextMenuItem = new ContextMenuItem("Replay the Video",restartIt);
theMenu.customItems[2] = item3;

var item4:ContextMenuItem = new ContextMenuItem("© 2005 Lee Brimelow",trace,true);
theMenu.customItems[3] = item4;

function pauseIt() {
ns.pause();
}

function stopIt() {
ns.seek(0);
ns.pause();
}

function restartIt() {
ns.seek(0);
}

_root.createEmptyMovieClip("vSound",_root.getNextH ighestDepth());
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");
}
}

var vlist:XML = new XML();
vlist.ignoreWhite = true;

vlist.onLoad = function() {
var videos:Array = this.firstChild.childNodes;
for(i=0;i<videos.length;i++) {
videoList.addItem(videos[i].attributes.desc,videos[i].attributes.url);
}

ns.play(videoList.getItemAt(0).data);
videoList.selectedIndex = 0;
}

var vidList:Object = new Object();

vidList.change = function() {
ns.play(videoList.getItemAt(videoList.selectedInde x).data);
}

videoList.addEventListener("change",vidList);

vlist.load("videos.xml");


videoList.setStyle("selectionColor",0xCCCCCC);
videoList.setStyle("textSelectedColor",0x000000);
videoList.setStyle("rollOverColor",0xCCCCCC);
kronic 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 15:41 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele