Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
//Erstellen der Klasse
_global.PhotoAlbum = function (holder_mc,photos_arr){
this.holder = holder_mc;
this.photos = photos_arr;
this.schowPhotoAt(0);
}
//die methode, die bestimmt, welches bild angezeigt werden soll
PhotoAlbum.prototype.showPhotoAt=function (n){
var lastindex = this.photos.length - 1;
if (n>lastindex) n= 0;
else if (n<0) n=lastindex;
this.index = n
this.holder.loadMovie(this.photos[this.index]);
}
// die nächstes-bild mthode
PhotoAlbum.prototype.next = function (){
this.showPhotoAt (this.index +1);
}
// die vorheriges-bild methode
PhotoAlbum.prototype.prev = function(){
this.showPhotoAt (this.index -1);
}
// container mc erstellen
this.createEmptyMovieClip("holder_mc",1);
//array füllen
photos_arr=["1.jpg","2.jpg","3.jpg","4.jpg","5.jpg","6.jpg"]
//instant erstellen
album = new PhotoAlbum (holder_mc, photos_arr);
prev_btn.onRelease = function (){
album.prev();
}
next_btn.onRelease = function (){
album.next();
}
Mann er hat warscheinlich keine ahnung von flash...wie kann man am besten eine diashow mit flash produzieren .