Add this code to the same frame where your gallery or galleries are located.
Pass the gallery Editblock movie clip that you wish to open, to the openGallery function:
openGallery(galleryMovieClip)
| Code: : |
openGallery(gallery1)
// AUTOMATE THE OPENING OF A GALLERY AND
// THE OPENING OF THE 1ST IMAGE IN THE GALLERY
function openGallery (openGallery) {
var autoOpenCount=0
var p
this.onEnterFrame = function () {
if ((autoOpenCount++)==20) openGallery.onPress() // OPEN GALLERY
else if (autoOpenCount==40) { // OPEN 1st FULL SIZE IMAGE
var gal = _root.theGallery
for (var n = 0; n < gal.NumberOfPics; n++) {
var p = eval(gal + ".p" + n)
if (p.galleryNum == gal.currentGallery) {
p.onPress()
break
}
}
delete this.onEnterFrame
}
}
}
|