webForumDet fria alternativet

Fotoalbum igen.

Flash

0 svar · 235 visningar · startad av ovea

Medlem sedan juli 20059 inlägg
Frågan#1

Nu har jag sett en finare än fade som jag har.

Typ http://208.46.28.168/photos%5Cfmx_slideshow_1_01.html

Och jag har koden som ser ut

pic_arr = ["flower_pink.jpg", "flower_yellow.jpg", "flower_purple.jpg", "flower_red.jpg", "flower_orange.jpg"];
color_arr = [0xf75eb0, 0xf6f818, 0xbb57c8, 0xdf1734, 0xfe9809];

// specify pic locations, alpha increment each frame, and
// number of frames to keep current picture displayed before 
// transitioning to the next one

blank_mc.attachMovie("slideshow", "uuShow", 1, {
	 _x:0, _y:0, _visible:false, fps:12, nFrames:24, alphaIncr:10, 
	 slides_arr:pic_arr, slideDepth:50, repeat:true});

// tell blank_mc to listen for events broadcast by uuShow
blank_mc.uuShow.addListener(blank_mc);

blank_mc.onSlideLoaded = function(i) {
	(new Color(this._parent["dot"+i+"_mc"])).setRGB(color_arr[i]);
//	trace('slide '+ i + ' loaded');
};

blank_mc.onAllSlidesLoaded = function() {
	this.uuShow._visible = true;
	this.uuShow.beginTransitions();
};

blank_mc.onShowOver = function() {
	//set repeat:false in uuShow for this to be called
	//trace('slideshow is over');
};

som jag fattar ingentingen alls hur jag ska sätta det till min fotoalbum.

slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.load("fotoalbum.xml");
slides_xml.ignoreWhite = true;

function fade(clip:MovieClip){
		mx.transitions.TransitionManager.start (clip,
			{type:mx.transitions.Fade, 
			direction:0, duration:1, easing:mx.transitions.easing.Regular.easeInOut, 
			param1:empty, param2:empty}); 
};

function startSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);
}
}
//
function updateSlide(newSlideNode) {
imagePath = newSlideNode.attributes.jpegURL;
slideText = newSlideNode.firstChild.nodeValue;
fade(visningKlipp);
loadMovie(imagePath, visningKlipp);
}
//
// Event handler for 'Next slide' button
next_btn.onRelease = function()
{
nextSlideNode = currentSlideNode.nextSibling;
if (nextSlideNode == null) {
break;
} else {
currentIndex++;
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
}
};
//
// Event handler for 'Previous slide' button
back_btn.onRelease = function() {
previousSlideNode = currentSlideNode.previousSibling;
if (previousSlideNode == null) {
break;
} else {
currentIndex--;
currentSlideNode = previousSlideNode;
updateSlide(previousSlideNode);
}
};

Är ju nybörjare :q

260 ms totalt · 4 externa anrop · v20260731065814-full.a51de22e
124 ms — deklarationer (db)
0 ms — hämta statistik (cache)
130 ms — hämta tråd, inlägg och bilagor (db)
127 ms — ändringar (db)