Featured FLA
» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden
Featured Site
» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.
Next we need to add some actionscript to give functionality to buttons. We have to create several functions, which we place into the first frame under ´Actions´. We will first discuss how to have slides shown in a row forward and backward. For this we create the two functions ´nextSlide´ and ´previousSlide´. k is a global variable here and set to "0" so that the start is always from the first slide. The first slide can be any number and does not have to be 1. We also add actionscript to get the current date.
Note: Comments to the actionscript are written in the fla file.
stop();
myDate = new Date();
dateTextField = (myDate.getMonth() + " - " +myDate.getDate() + " - " +myDate.getFullYear());
k = 0;
function nextSlide(firstSlide,lastSlide,slideName,slideText) {
k = k+1;
i = (firstSlide - 1) + k;
newSlide = slideHolder.loadMovie(slideName + i + ".jpg");
newText = loadVariablesNum(slideText + i + ".txt", 0);
if (i == firstSlide) {
_root.leftBut._visible = false;
}else{
_root.leftBut._visible = true;
}
if (i == lastSlide) {
_root.rightBut._visible = false;
k = 1;
}else{
_root.rightBut._visible = true;
}
_root.whiteBox._visible = true;
_root.newSlide;
_root.newText;
}