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.
Most users still have modems so we have to preload the slides to have them ready when buttons are pushed. We make a preload function here
//function to preload slides
function loadAll(firstSlide,lastSlide,slideName,introSlide){
for (j=1;j<=lastSlide;j++) {
//use duplicateMovieClip here instaed of createEmptyMovieClip
duplicateMovieClip (_root.slideHolder, "pic_"+j, j);
//make the slides invisible not to see the loading
setProperty ("pic_"+j, _alpha, (0));
loadMovie(slideName+j+".jpg","pic_"+j);
//load slides into slideholder_1 and make it invisible not to see the loading
loadMovie(slideName+j+".jpg","slideHolder_1");
setProperty("slideHolder_1",_alpha, (0));
//here we load an introduction slide
loadMovie(introSlide,"slideHolder");
}
}
To monitor the loading we attach the following script to slideHolder_1.
onClipEvent(enterFrame){
if(this._url != _root._url && !loaded) {
// calculate size of pics in kilobytes
var kilobytes = Math.ceil(this.getBytesTotal()/1024);
// calculate percent loaded
var percentLoaded = Math.ceil((this.getBytesLoaded()/this.getBytesTotal()) * 100);
// show loading message
_root.percentOutput = "loading " + percentLoaded + "% of " + kilobytes + "k";
//show text loading slides
_root.loadText.gotoAndPlay("play");
if(percentLoaded == 100){
//loading terminated
loaded = true;
_root.percentOutput = "Ready";
_root.loadText.gotoAndStop("stop");
}
}
}