scrollbare Bildergalerie: wie kommt man nahtlos wieder zum Anfang? [Flash 9]
| Beiträge: 1 Wohnort: NRW Registriert: Jan 2010
| 21.01.2010, 15:00
Habe mir ne Bildergalerie gebastelt, die horizontal ausgerichtete thumbs enthält, die nach recht und links scollbar sind und durch klick vergrößert werden.
So sieht das ganze vom Prinzip her aus: [url=http://www.republicofcode.com/tutorials/flash/imagegallery/]
Kann mir jemand erklären, welches Script ich brauche, damit sich nach dem letzten Bild wieder das erste anschließt usw und man sozusagen "im Kreis" navigieren kann?
Hab die Datei nach diesem Tutorial aufgebaut, bin aber leider nicht in der Lage, das Script richtig zu verstehen, geschweige denn zu wissen, was ich wo einfügen muss, um den Effekt zu erzielen.
Wäre für eure Hilfe - oder sogar ein bisschen Script - wirklich dankbar!!!
hier mein bisheriges Script:
ActionScript:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | import mx.transitions.Tween;
import mx.transitions.easing.*;
this.createEmptyMovieClip("container",1);
var imagesNumber:Number = 31;
var scrolling:Boolean = true;
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);
myThumb_mc = container["thumb"+i+"_mc"];
myThumb_mc._x = (i-1)*myThumb_mc._width;
myThumb_mc._y = (Stage.height-myThumb_mc._height)/2
myThumb_mc._alpha=50;
myThumb_mc.largerImage = i;
myThumb_mc.onRollOver = function(){
this._alpha=100;
}
myThumb_mc.onRollOut = function(){
this._alpha=50;
}
myThumb_mc.onRelease = function(){
this._alpha=50;
for (i=1; i<=imagesNumber; i++) {
var myClip = container["thumb"+i+"_mc"];
myClip.enabled = false;
}
scrolling = false;
_root.attachMovie("image"+this.largerImage,"large_mc",2);
large_mc._x = (Stage.width - large_mc._width)/2;
large_mc._y = (Stage.height - large_mc._height)/2;
new Tween(large_mc,"_alpha",Strong.easeOut,0,100,0.5,true);
new Tween(container,"_alpha",Strong.easeOut,100,50,0.5,true);
large_mc.onRelease = function(){
scrolling = true;
var myFadeOut = new Tween (large_mc,"_alpha",Strong.easeOut, 100,0,0.5,true);
new Tween(container,"_alpha",Strong.easeOut,50,100,0.5,true);
myFadeOut.onMotionFinished=function(){
for (i=1; i<=imagesNumber; i++) {
var myClip = container["thumb"+i+"_mc"];
myClip.enabled = true;
}
large_mc.removeMovieClip();
}
this.removeMovieClip();
}
}
}
container.onEnterFrame = function (){
if (scrolling){
this._x += Math.cos((-_root._xmouse/Stage.width)*Math.PI)*10;
}
if (this._x>0) {
this._x = 0;
}
if (-this._x>(this._width-Stage.width)) {
this._x = -(this._width-Stage.width);
}
}
|
| Geändert von peachypessa am 21.01.10 um 15:02 Uhr | |
|
| Ähnliche Beiträge zum Thema | 08.05.2022 - Indy_Crossover |
|
Flashhilfe.de Flash Platform Tipps & Tutorials Flash Platform Andere Programmiersprachen Jobangebote Diskussionen
Flashhilfe News
Regeln & Bedingungen
|