MarcovandenOever
%Europe/Berlin %621 %2005, 14:55
Hallo. Ik heb eigenlijk hetzelfde probleem als besproken in de lead van Renzo01. Heb een .swf file met daarin via actionscripting een .flv. Lokaal werkt het prima, maar eenmaal op de server weigert ie in alle toonaarden. Heb de host gevraagd de MIME toe te voegen maar ook dit werkt niet.
De URL is http://www.create-n-communicate.nl/Website2006/
De website is verder nog under construction.
Dit is de code:
// -----------[set up NetConnection & NetStream Objects]------------- \\
var myNC:NetConnection = new NetConnection();
myNC.connect(null);
var myNS:NetStream = new NetStream(myNC);
this.myVideo.attachVideo(myNS);
// -----------[/set up NetConnection & NetStream Objects]------------- \\
// -----------[download the TRT]------------- \\
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success) {
if (success) {
myNS.play("promo.flv");
}
}
myLV.load("videoTRT.txt");
// -----------[/download the TRT]------------- \\
// -----------[download progress bar]------------- \\
// activate the download progress bar & kill it when the movie has been completely downloaded.
this.progressBars.downloadProgress.onEnterFrame = function() {
var vidDLPercent:Number = (myNS.bytesLoaded/myNS.bytesTotal)*100;
this._width = vidDLPercent * 2;
if (myNS.bytesLoaded == myNS.bytesTotal && myNS.bytesLoaded > 0) {
delete progressBars.downloadProgress.onEnterFrame;
}
}
// -----------[/download progress bar]------------- \\
// -----------[playback progress bar]------------- \\
function showPlaybackProgress() {
progressBars.playbackProgress.onEnterFrame = function() {
var vidProgress:Number = (myNS.time/myLV.videoTRT) * 100;
this._width = vidProgress * 2;
}
}
// -----------[/playback progress bar]------------- \\
// -----------[Start & Stop events]------------- \\
myNS.onStatus = function(info) {
if (info.code == "NetStream.Play.Start") {
showPlaybackProgress();
}
if (info.code == "NetStream.Play.Stop") {
myNS.seek(0);
myNS.pause();
progressBars.playbackProgress._width = 1;
delete progressBars.playbackProgress.onEnterFrame;
}
}
// -----------[/Start & Stop events]------------- \\
// -----------[play/pause buttons]------------- \\
this.videoPlay.onRelease = function() {
myNS.pause(false);
showPlaybackProgress();
}
this.videoPlay.onRollOver = function() {
this._alpha = 65;
}
this.videoPlay.onRollOut = function() {
this._alpha = 100;
}
this.videoPause.onRelease = function() {
myNS.pause(true);
delete progressBars.playbackProgress.onEnterFrame;
}
this.videoPause.onRollOver = function() {
this._alpha = 65;
}
this.videoPause.onRollOut = function() {
this._alpha = 100;
}
// -----------[/play/pause buttons]------------- \\
De URL is http://www.create-n-communicate.nl/Website2006/
De website is verder nog under construction.
Dit is de code:
// -----------[set up NetConnection & NetStream Objects]------------- \\
var myNC:NetConnection = new NetConnection();
myNC.connect(null);
var myNS:NetStream = new NetStream(myNC);
this.myVideo.attachVideo(myNS);
// -----------[/set up NetConnection & NetStream Objects]------------- \\
// -----------[download the TRT]------------- \\
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success) {
if (success) {
myNS.play("promo.flv");
}
}
myLV.load("videoTRT.txt");
// -----------[/download the TRT]------------- \\
// -----------[download progress bar]------------- \\
// activate the download progress bar & kill it when the movie has been completely downloaded.
this.progressBars.downloadProgress.onEnterFrame = function() {
var vidDLPercent:Number = (myNS.bytesLoaded/myNS.bytesTotal)*100;
this._width = vidDLPercent * 2;
if (myNS.bytesLoaded == myNS.bytesTotal && myNS.bytesLoaded > 0) {
delete progressBars.downloadProgress.onEnterFrame;
}
}
// -----------[/download progress bar]------------- \\
// -----------[playback progress bar]------------- \\
function showPlaybackProgress() {
progressBars.playbackProgress.onEnterFrame = function() {
var vidProgress:Number = (myNS.time/myLV.videoTRT) * 100;
this._width = vidProgress * 2;
}
}
// -----------[/playback progress bar]------------- \\
// -----------[Start & Stop events]------------- \\
myNS.onStatus = function(info) {
if (info.code == "NetStream.Play.Start") {
showPlaybackProgress();
}
if (info.code == "NetStream.Play.Stop") {
myNS.seek(0);
myNS.pause();
progressBars.playbackProgress._width = 1;
delete progressBars.playbackProgress.onEnterFrame;
}
}
// -----------[/Start & Stop events]------------- \\
// -----------[play/pause buttons]------------- \\
this.videoPlay.onRelease = function() {
myNS.pause(false);
showPlaybackProgress();
}
this.videoPlay.onRollOver = function() {
this._alpha = 65;
}
this.videoPlay.onRollOut = function() {
this._alpha = 100;
}
this.videoPause.onRelease = function() {
myNS.pause(true);
delete progressBars.playbackProgress.onEnterFrame;
}
this.videoPause.onRollOver = function() {
this._alpha = 65;
}
this.videoPause.onRollOut = function() {
this._alpha = 100;
}
// -----------[/play/pause buttons]------------- \\