| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Neuer User Registriert seit: Nov 2005
Beiträge: 28
|
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" 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(); }
__________________ Erkläre mir alles, als wäre ich 2 Jahre alt =) |
| | |
| | #2 (permalink) | |
| Gast
Beiträge: n/a
| Zitat:
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. | |
|
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |