mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Fr 19.04.2024 23:50 Benutzername: Passwort: Auto-Login

Thema: Bilder werden falsch sortiert! -.- (AS-Galerie) vom 26.02.2007


Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Multimedia -> Bilder werden falsch sortiert! -.- (AS-Galerie)
Autor Nachricht
AK-Zent
Threadersteller

Dabei seit: 17.01.2006
Ort: -
Alter: 111
Geschlecht: Männlich
Verfasst Mo 26.02.2007 16:33
Titel

Bilder werden falsch sortiert! -.- (AS-Galerie)

Antworten mit Zitat Zum Seitenanfang

Hallo, ich habe hier schon einige leute mit meiner Galerie genervt,
aber ich langsam nimmt es Form an. Lächel

Aber jetzt habe ich nur noch ein problem.
In dem Galeriescript muss irgendwo sicherlich einzustellen gehen,
das die Bilder der Reihenfolge nach angezeigt werden, und nicht willkürlich.

Aufgebaut ist die Galerie mit Movieclips, die alle eine bezeichnung haben.

Hier mal der Code, vielleicht kennt sich jemand von euch damit aus und weiss wo die stelle ist?! Au weia!

Code:

/*
SCROLL HORIZONTAL CONTINUO Flash MX   by    Teseo
No es necesario redimensionar las imagenes, se autoajustan.
Montar cada imagen en un MC para attach y vincularlos
con nombres  MC1 , MC2 , MC3  ......etc.
Definir las variables de inicio según necesidad.
*/
Nmcs = 5;// numero de MC´s para scrolling
espacio = 10;//espacio que se deja entre las fotos
Xc = 5;//coordenada x  de la caja del scroll
Yc = 5;//coordenada y  de la caja del scroll
Xo = 10;// coordenada x origen visor
Yo = 135;// coordenada y origen visor
Xf = 797;// coordenada x extremo visor (Xo + ancho)
Yf = 570;// coordenada y extremo visor (Yo = alto)
alturamax = 90;//para reescalar si la imagen es mas alta
anchmax = 793;//anchura maxima del scroll
velo = velobase=1;//velocidad  base pos o neg
ajuste = false;//true: iguala los altos a alturamax
aleatorio = true;// false: no carga aleatoriamente
bandapelicula = true; // false para quitar banda de cine
//end de variables de inicio
fondo._visible= false;
cl=new Array(0x000000,0x0000ff,0xff0000,0xffffff);
barajar(Nmcs);
examples();// delete esta linea para usar la aplicacion
function examples() {// delete esta linea para usar la aplicacion
createEmptyMovieClip("imgMC", 1);
imgMC._y = Yc;
actual = 0;
anchomas = 0;
altomas = 0;
mc = [];
A = Nmcs*2;
for (k=0; k<A; k++){
   mc[k] = imgMC.attachMovie("MC"+bar[k%Nmcs],"MC"+bar[k%Nmcs],100+k);
   with (mc[k]){
      _x = actual;
      _y= 15;
      if (_height>alturamax || ajuste){
         _yscale = alturamax*100/_height;
         _xscale = _yscale;
      }
      _width>anchomas ? anchomas=_width : null;
      _height>altomas ? altomas=_height : null;
      actual += _width+espacio;
   }
}
actual/2>anchmax ? anchura=anchmax : anchura=actual/2;
mc[A] = createEmptyMovieClip("m",0);
marco(A,Xo,Yo,Xf,Yf,5,cl[0],cl[0],8);
mc[A+2]=imgMC.createEmptyMovieClip("mascara",199);
marco(A+2,0,0,anchura,altomas+30,5,0,cl[3],20);
imgMC._x = Xc-anchomas;
bandapelicula ? bandafilm(): null;
imgMC.mascara._x = anchomas;
imgMC.setMask(imgMC.mascara);
onEnterFrame = function (){
   for (k=0; k<Nmcs*2; k++){
      with (mc[k]){
         _x += velo;
         _x-actual>=velo ? _x -= actual : null;
         _x<=0 ? _x += actual : null;
         condicion(k) ? borde(k) : mc1.removeMovieClip();
      }
   }
   mc[A+5]._x=(mc[A+5]._x+ velo)%25 ;
}
function borde(k) {
   mc[A+3]=mc[k].createEmptyMovieClip("mc1", 201);
   marco(A+3,5,5,mc[k]._width-5,mc[k]._height-5,2,0xfff00,0xff0000,10);
   mc[A+3]._xscale = 10000/mc[k]._xscale;
   mc[A+3]._yscale = 10000/mc[k]._yscale;
   activo = k;
}
function mmin() {
   velo = 0;
   xm = _xmouse;
   imgMC.mascara.onMouseMove = function() {
      if (Math.abs(xm-_xmouse)>30) {
         velo = (Xc+imgMC.mascara._width/2-_xmouse)/20;
         actpress = false;
      }
   };
}
function condicion(k) {
   with (mc[k]) {
      return (_width*100/_xscale>_xmouse && _xmouse>0
            && _height*100/_yscale>_ymouse && _ymouse>0
            && imgMC.mascara._width>imgMC.mascara._xmouse
            && imgMC.mascara._xmouse>0);
   }
}
imgMC.mascara.onPress = function() {
   velo = 0;
   entra = true;
   actpress && condicion(activo) ? openimg(activo) : null;
   delete imgMC.mascara.onMouseMove;
};
imgMC.mascara.onRelease = function() {
   mmin();
   entra = false;
   actpress = true;
};
imgMC.mascara.onRollOut = function() {
   velobase * velo>=0 ? velo=velobase: velo=-velobase;
   delete imgMC.mascara.onMouseMove;
};
imgMC.mascara.onRollOver = function() {
   mmin();
};
}//fin de examples delete esta linea para usar la aplicacion

function barajar(clips) {
   bar = [];
   for (var m = 0; m<clips; m++) {
      bar[m] = m;
   }
   if (aleatorio) {
      for (var i = clips-1; i>0; i--) {
         alea = Math.floor(i*Math.random());
         var temp = bar[i];
         bar[i] = bar[alea];
         bar[alea] = temp;
      }
   }
}


function openimg(k) {
   if (entra) {
      _root.attachMovie("MC"+(bar[k%Nmcs]), "vista", 220);
      boton.enabled = false;// delete para usar la aplicacion
      boton._visible = false;// delete para usar la aplicacion
      vista._width = Xf-Xo-3;
      vista._yscale = vista._xscale;
      if (vista._height>Yf-Yo-3) {
         vista._height = Yf-Yo-3;
         vista._xscale = vista._yscale;
      }
      vista._x = Xo+(Xf-Xo-vista._width)/2;
      vista._y = Yo+(Yf-Yo-vista._height)/2;
      vista.onPress = function() {
         vista.removeMovieClip();
         boton.enabled = true;// delete para usar la aplicacion
         boton._visible = true;// delete para usar la aplicacion
      }
   }
   !entra ? (vista.removeMovieClip()): null;
}


function marco(k, Xo, Yo, Xf, Yf,la, color, color2, alpha) {
   with (mc[k]) {
      lineStyle(la, color, 90);
      beginFill(color2, alpha);
      moveTo(Xo, Yo);
      lineTo(Xf,Yo);
      lineTo(Xf, Yf);
      lineTo(Xo,Yf);
      lineTo(Xo, Yo);
      endFill();
   }
}


function bandafilm(){
   mc[A+5]=imgMC.createEmptyMovieClip("banda",5);
   marco(A+5,anchomas-25, 0,anchomas+anchura+25, altomas+30, 0, cl[0], cl[0], 80);
      for (b=0; b<=anchura+50; b+=25){
           marco(A+5,-25+b+anchomas,4,-25+b+10+anchomas , 11, 0,cl[3],cl[3], 80);   
         marco(A+5,-25+b+anchomas, altomas+19,-25+b+10+anchomas , 26+altomas, 0,cl[3],cl[3], 80);
      }
}


//delete la siguiente funcion para usar la aplicacion
boton.onPress = function() {
   mc[A].removeMovieClip();
   texto._visible = false;
   Nmcs = 1+random(11);
   espacio = random(30);
   Xc = 10*random(15);
   Yc = 10*random(15);
   alturamax = 30+10*random(20);
   anchmax = 190+20*random(30);
   velo = velobase=2+random(2);
   Xo = Xc;
   Yo = alturamax+Yc+35;
   Xf = 795-Xc;
   Yf = 595;
   ajuste = !ajuste;
   bandapelicula = true*(random(5)>=2)
   barajar(11);
   examples();
   cl[3]=0xffffff;
   cl[0]=0x000000;
   fondo._visible= false;
   if (random(5)==1){ cl[0]=0xffffff;cl[3]=0x000000;fondo._visible= true;}
   if (random(5)==1){ cl[0]=0x0000ff;cl[3]=0xffffff;fondo._visible= true;}
};
/*
Para usar la aplicacion borrar o pasar a comentarios las lineas indicadas.
Eliminar la capa 2 del escenario y el boton de la biblioteca.
*/



viele Grüße,

Mathias
  View user's profile Private Nachricht senden
Zeithase

Dabei seit: 09.05.2005
Ort: Erfurt
Alter: 39
Geschlecht: Männlich
Verfasst Mo 26.02.2007 17:54
Titel

Antworten mit Zitat Zum Seitenanfang

Zitat:
aleatorio = true;// false: no carga aleatoriamente


http://www.spanishdict.com/AS.cfm?e=aleatorio

Alles klar? Lächel
  View user's profile Private Nachricht senden
Anzeige
Anzeige
AK-Zent
Threadersteller

Dabei seit: 17.01.2006
Ort: -
Alter: 111
Geschlecht: Männlich
Verfasst Di 27.02.2007 11:35
Titel

Antworten mit Zitat Zum Seitenanfang

Dankeschön * Ich bin unwürdig * ... Lächel
  View user's profile Private Nachricht senden
 
Ähnliche Themen bilder galerie
Bilder Galerie
Suche Programm für Bilder-Galerie-CDs
Bilder in Galerie langsam aufghehen lassen
Bilder Galerie - automatische hervorhebung - Mouseover ?
Beim Webseite ausdrucken alle Bilder einer Galerie drucken?
Neues Thema eröffnen   Neue Antwort erstellen
MGi Foren-Übersicht -> Multimedia


Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst an Umfragen in diesem Forum nicht mitmachen.