Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 14-06-2006, 18:26   #1 (permalink)
Neuer User
 
Benutzerbild von pgnala
 
Registriert seit: Nov 2005
Beiträge: 28
Unhappy Flash Video Player spielt Dateien nicht ab

Hallo Leute!

Ich habe mir den FLV-Player von jeroenwijering heruntergeladen! Beim ersten Mal mit dem mitgelieferten Video funktionierte er. Ich habe die angezeigte
Bildgröße verändert, den Namen des FLVs und so weiter. Jedoch funktioniert
er nun nicht mehr und ich weiß absolut nicht woran es liegen könnte.

Bitte um Hilfe!
LG Nala


Flash-Datei:


Code:
Stage.scaleMode = "scale";
Stage.align = "TL";
stop();



var newMenu:ContextMenu = new ContextMenu();
newMenu.hideBuiltInItems();
newMenu.customItems.push(new ContextMenuItem("Flash Video Player 2.4 by Jeroenwijering...",goTo));
this.menu = newMenu;
function goTo() { getURL("http://www.jeroenwijering.com/?item=Flash_Video_Player"); };

//Einbindung
#include "player.as"
ActionScript:

Code:
if(!_root.file) {
	file = 'test.flv' 
} else {
	file = _root.file;
}

if(_root.autoStart == 'true' || _root.autostart == 'true') {
	autoStart = true;
} else {
	autoStart = false;
}

w = Stage.width;
h = Stage.height;

nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);

this.createEmptyMovieClip("snd", 0);
snd.attachAudio(ns);
audio = new Sound(snd);
audio.setVolume(80);


videoDisplay.attachVideo(ns);


ns.onMetaData = function(obj) {
	this.totalTime = obj.duration;
	
};

ns.onStatus = function(object) { 
	if(object.code == "NetStream.Play.Stop") {
		ns.seek(0);
		ns.pause();
		playBut._visible = true;
		pauseBut._visible = false;
		videoDisplay._visible = false;
		playText.txt.text = "click to play";
	}
};

function playMovie() {
	if(!isStarted) {
		ns.play(file);
		playText.txt.text = "loading ..";
		isStarted = true;
	} else {
		ns.pause();
	}
	pauseBut._visible = true;
	playBut._visible = false;
	videoDisplay._visible = true;
}

function pauseMovie() {
	ns.pause();
	playBut._visible = true;
	pauseBut._visible = false;
};

videoBg.onPress = function() {
	if(pauseBut._visible == false) {
		playMovie();
	} else {
		pauseMovie();
	}
};

pauseBut.onPress = function() {
	pauseMovie();
};

playBut.onPress = function() {
	playMovie();
};

progressBar.onEnterFrame = function() {
	loaded = this._parent.ns.bytesLoaded;
	total = this._parent.ns.bytesTotal;
	if (loaded == total && loaded > 1000) {
		this.loa._xscale = 100;
		delete this.onEnterFrame;
	} else {
		this.loa._xscale = int(loaded/total*100);
	}
};

progressBar.tme.onEnterFrame = function() {
	this._xscale = ns.time/ns.totalTime*100;
};

progressBar.loa.onPress = function() {
	this.onEnterFrame = function() {
		scl = (this._xmouse/this._width)*(this._xscale/100)*(this._xscale/100);
		if(scl < 0.02) { scl = 0; }
		ns.seek(scl*ns.totalTime);
	};
};

progressBar.loa.onRelease = progressBar.loa.onReleaseOutside = function () { 
	delete this.onEnterFrame;
	pauseBut._visible == false ? videoDisplay.pause() : null;
};

volumeBar.back.onPress = function() {
	this.onEnterFrame = function() {
		var xm = this._xmouse;
		if(xm>=0 && xm <= 20) {
			this._parent.mask._width = this._xmouse;
			this._parent._parent.audio.setVolume(this._xmouse*5);
		}
	};
}
volumeBar.back.onRelease = volumeBar.back.onReleaseOutside = function() {
	delete this.onEnterFrame;
}

function setDims(w,h) {
	videoDisplay._width = videoBg._width = w;
	videoDisplay._height = videoBg._height = h-20;
	playText._x = w/2-120;
	playText._y = h/2-20;
		
	playBut._y = pauseBut._y = progressBar._y = volumeBar._y = h-20;
	progressBar._width = w-56;
	volumeBar._x = w-38;
}


setDims(800,600);

pauseBut._visible = false;
imageStr = substring(file,0,file.length-3)+"jpg";
imageClip.loadMovie(imageStr);
if (autoStart == true) { playMovie(); }
Meine Dateien heißen: player.as, player.fla und test.flv! Aber er spielt sie einfach nicht ab ^^ *grml*
__________________
Erkläre mir alles, als wäre ich 2 Jahre alt =)
pgnala ist offline   Mit Zitat antworten
Alt 14-06-2006, 22:49   #2 (permalink)
agedoubleju
Gast
 
Beiträge: n/a
Zitat:
Beim ersten Mal mit dem mitgelieferten Video funktionierte er.
Mit Flash MX? Oder hast du einen neuen Player aber eine ältere Entwicklungsumgebung?

Aber die Frage solltest du besser dem Entwickler stellen. Hab den Fehler auch nicht gleich im Script gefunden...

Ansonsten empfehle ich ein Update auf Flash 8, da gibt es eine FLVPlayback-Komponente, die (fast) keinen Wunsch mehr offen lässt.
  Mit Zitat antworten
Alt 15-06-2006, 13:05   #3 (permalink)
Neuer User
 
Benutzerbild von pgnala
 
Registriert seit: Nov 2005
Beiträge: 28
Unhappy Antwort

Hmm ich hab Flash MX Und hab da auch alle Komponenten gefunden..
__________________
Erkläre mir alles, als wäre ich 2 Jahre alt =)
pgnala ist offline   Mit Zitat antworten
Alt 15-06-2006, 15:01   #4 (permalink)
agedoubleju
Gast
 
Beiträge: n/a
FLVs funzen erst ab Flash MX2004, du müsstest also zumindest den 7er-Player haben. Ob du dann aber auch diese Komponente nutzen kannst, weiß ich auch nicht...
  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 12:40 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele