wierdude
11-25-2004, 03:17 PM
hi
i just had my problem solved about my pictures not appearing after publishing. but now i put my web page on my linux server and it won't show the pictures. the page runs and does everything except show the pictures.
here is the script:
// variables ------------------------------------------
// put the path to your pics here, include the slashes (ie. "pics/")
// leave it blank if they're in the same directory
this.pathToPics = "DBZ400/";
// fill this array with your pics
this.pArray = ["dbz1.jpg", "dbz2.jpg", "dbz3.jpg", "dbz4.jpg", "dbz5.jpg", "dbz6.jpg", "dbz7.jpg", "dbz8.jpg", "dbz9.jpg", "dbz10.jpg", "dbz11.jpg", "dbz12.jpg", "dbz13.jpg", "dbz14.jpg", "dbz15.jpg", "dbz16.jpg", "dbz17.jpg", "dbz18.jpg", "dbz19.jpg", "dbz20.jpg", "dbz21.jpg", "dbz22.jpg", "dbz23.jpg", "dbz24.jpg", "dbz25.jpg", "dbz26.jpg", "dbz27.jpg", "dbz28.jpg", "dbz29.jpg", "dbz30.jpg", "dbz31.jpg", "dbz32.jpg", "dbz33.jpg"];
this.fadeSpeed = 20;
this.pIndex = 0;
// MovieClip methods ----------------------------------
// d=direction; should 1 or -1 but can be any number
// loads an image automatically when you run animation
photo._x = 310;
photo._y = 250;
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = function(d) {
// make sure pIndex falls within pArray.length
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
// specify the movieclip to load images into
var p = _root.photo;
// ------------------------------------------
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};
// Actions -----------------------------------------
// these aren't necessary, just an example implementation
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changePhoto(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changePhoto(1);
}
};
Key.addListener(this);
i just had my problem solved about my pictures not appearing after publishing. but now i put my web page on my linux server and it won't show the pictures. the page runs and does everything except show the pictures.
here is the script:
// variables ------------------------------------------
// put the path to your pics here, include the slashes (ie. "pics/")
// leave it blank if they're in the same directory
this.pathToPics = "DBZ400/";
// fill this array with your pics
this.pArray = ["dbz1.jpg", "dbz2.jpg", "dbz3.jpg", "dbz4.jpg", "dbz5.jpg", "dbz6.jpg", "dbz7.jpg", "dbz8.jpg", "dbz9.jpg", "dbz10.jpg", "dbz11.jpg", "dbz12.jpg", "dbz13.jpg", "dbz14.jpg", "dbz15.jpg", "dbz16.jpg", "dbz17.jpg", "dbz18.jpg", "dbz19.jpg", "dbz20.jpg", "dbz21.jpg", "dbz22.jpg", "dbz23.jpg", "dbz24.jpg", "dbz25.jpg", "dbz26.jpg", "dbz27.jpg", "dbz28.jpg", "dbz29.jpg", "dbz30.jpg", "dbz31.jpg", "dbz32.jpg", "dbz33.jpg"];
this.fadeSpeed = 20;
this.pIndex = 0;
// MovieClip methods ----------------------------------
// d=direction; should 1 or -1 but can be any number
// loads an image automatically when you run animation
photo._x = 310;
photo._y = 250;
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = function(d) {
// make sure pIndex falls within pArray.length
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
// specify the movieclip to load images into
var p = _root.photo;
// ------------------------------------------
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};
// Actions -----------------------------------------
// these aren't necessary, just an example implementation
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changePhoto(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changePhoto(1);
}
};
Key.addListener(this);