chuckt
03-09-2005, 09:53 AM
The following is the slideshow im trying to get to work from a tutorial.
I want to place it on a site im working on but when I do it don't work. I imagine its the // specify pic locations. I guess Im to new to figure this out my self I've used every combination. My slideshow and pics are in a folder on my serverside ftp called fmx_slideshow. How would I specify this in line 1.
It works fine on my computer using FMX04'.
Thanks Chuck :)
pic_arr = ["01.jpg", "02.jpg", "03.jpg", "04.jpg", "05.jpg", "06.jpg", "07.jpg", "08.jpg", "09.jpg", "010.jpg", "011.jpg"];
var color_arr = [0xf75eb0, 0xf6f818, 0xbb57c8, 0xdf1734, 0xfe9809];
var currentSlide = 0;
// specify pic locations, alpha increment each frame, and
// number of frames to keep current picture displayed before
// transitioning to the next one
this.attachMovie("slideshow", "show", 1, {
_x:0, _y:0, _visible:false, fps:12, nFrames:24, alphaIncr:10,
slides_arr:pic_arr, slideDepth:1, repeat:true,
slideTracker:"currentSlide"});
// tell _root (this) to listen for events broadcast by show
show.addListener(this);
this.onSlideLoaded = function(i) {
(new Color(this["dot"+i+"_mc"])).setRGB(color_arr[i]);
// trace('slide '+ i + ' loaded');
};
this.onAllSlidesLoaded = function() {
show._visible = true;
show.beginTransitions();
};
this.onShowOver = function() {
//set repeat:false in show for this to be called
//trace('slideshow is over');
};
toggle_mc.onRelease = function() {
// if playing
if (this._currentframe == 1) {
this.gotoAndStop("stopped");
// stop the show on the current slide
show.stopTransitions();
// make sure current picture is displayed at 100 alpha
for (var t=0; t<pic_arr.length; t++) {
if (t==currentSlide) {
show["slide"+t]._alpha = 99;
} else {
show["slide"+t]._alpha = 0;
}
}
// if stopped
} else {
// start up transitions from current slide
this.gotoAndStop("playing");
show.activateInSeq(currentSlide);
}
};
I want to place it on a site im working on but when I do it don't work. I imagine its the // specify pic locations. I guess Im to new to figure this out my self I've used every combination. My slideshow and pics are in a folder on my serverside ftp called fmx_slideshow. How would I specify this in line 1.
It works fine on my computer using FMX04'.
Thanks Chuck :)
pic_arr = ["01.jpg", "02.jpg", "03.jpg", "04.jpg", "05.jpg", "06.jpg", "07.jpg", "08.jpg", "09.jpg", "010.jpg", "011.jpg"];
var color_arr = [0xf75eb0, 0xf6f818, 0xbb57c8, 0xdf1734, 0xfe9809];
var currentSlide = 0;
// specify pic locations, alpha increment each frame, and
// number of frames to keep current picture displayed before
// transitioning to the next one
this.attachMovie("slideshow", "show", 1, {
_x:0, _y:0, _visible:false, fps:12, nFrames:24, alphaIncr:10,
slides_arr:pic_arr, slideDepth:1, repeat:true,
slideTracker:"currentSlide"});
// tell _root (this) to listen for events broadcast by show
show.addListener(this);
this.onSlideLoaded = function(i) {
(new Color(this["dot"+i+"_mc"])).setRGB(color_arr[i]);
// trace('slide '+ i + ' loaded');
};
this.onAllSlidesLoaded = function() {
show._visible = true;
show.beginTransitions();
};
this.onShowOver = function() {
//set repeat:false in show for this to be called
//trace('slideshow is over');
};
toggle_mc.onRelease = function() {
// if playing
if (this._currentframe == 1) {
this.gotoAndStop("stopped");
// stop the show on the current slide
show.stopTransitions();
// make sure current picture is displayed at 100 alpha
for (var t=0; t<pic_arr.length; t++) {
if (t==currentSlide) {
show["slide"+t]._alpha = 99;
} else {
show["slide"+t]._alpha = 0;
}
}
// if stopped
} else {
// start up transitions from current slide
this.gotoAndStop("playing");
show.activateInSeq(currentSlide);
}
};