flash

  • Habe ein rieses Problem in meinem Script und weiss nicht weiter wäre froh wenn mir jemand helfen könnte.

    Es geht um folgendes habe zwei Scripts kopiert und an meine wünsche angepasst der eine ist eine dynamische Bildergalerie und der andere
    Script eine Scrollbar beide zusammen können nicht zusammen funftionieren wegen folgender Zeile
    createEmptyMovieClip ("mc_bild", 1);

    Mit dieser Zeile funktioniert die Bildergallerie, setzt man jedoch diese Zeile in ein Kommentar so funktioniert die Scrollbarr jedoch nicht mehr
    die Bildergallerie. Kenn mich etwas aus mit programation jedoch bin ich hier mit meinem Latein am Ende.

    Danke im vorraus

  • // Starten
    loadVariables ("bilder.txt", this);
    this.onData = function ()
    {
    alleBilder = new Array ();
    alleBilder = bildnamen.split (",");
    createEmptyMovieClip ("mc_bild", 1);
    setArray (0);
    }

    fscommand ("allowscale", "false");

    liste1 = new Array();

    liste1[1] = "Matthias Kannengiesser";
    liste1[2] = "Caroline Kannengiesser";
    liste1[3] = "Arnold Schwarzenegger";
    liste1[4] = "Roberto Blanko";
    liste1[5] = "Shakira";
    liste1[6] = "Will Smith";

    besch = new Array();

    besch[1] = "Wer oder was ist den Matze ?";
    besch[2] = "Das scheint mir die Schwester von Matze !";
    besch[3] = "Ein recht bekannter Schauspieler";
    besch[4] = "Ein Sänger aus Deutschland";
    besch[5] = "Ein Sängerin aus den Staaten";
    besch[6] = "Ein Schauspieler aus den Staaten";


    i = 1;
    Anzahl = liste1.length-1;

    for (i=1; i<=Anzahl; i++) {
    attachMovie( "klon", "klon" + i, i);
    this['klon'+i]._x = 300;
    this['klon'+i]._y += this['klon'+i]._height*i;
    this['klon'+i].zahl = "Person "+i+": "+liste1[i];
    this['klon'+i].inhalt = besch[i];
    }

    function runter(wert) {
    for ( j=1;j<=Anzahl; j++ ) {
    this['klon'+j]._y += wert;
    if (this['klon'+j]._y > klon1._height*Anzahl) {
    this['klon'+j]._y = klon1._height;
    }
    }
    }


    function hoch(wert) {
    for (k=1;k<=Anzahl; k++ ) {
    this['klon'+k]._y -= wert;
    if (this['klon'+k]._y < klon1._height) {
    this['klon'+k]._y = klon1._height*Anzahl;
    }
    }
    }// Spalten und Reihen
    pS = 10;
    pR = 1;
    // Limit
    max = pS * pR;
    // Zweidimensionales Array erzeugen
    function setArray (pT)
    {
    spielLevel = new Array ();
    for (var m = 0; m < pR; m++)
    {
    spielLevel[m] = [];
    for (var n = 0; n < pS; n++)
    {
    spielLevel[m].push (alleBilder[pT++]);
    }
    }
    tabelle (120, 510, 60, 60);
    }
    // Movieclips setzen
    function tabelle (posX, posY, pB, pW)
    {
    for (i in this.mc_bild)
    {
    if (typeof (this.mc_bild[i]) == "movieclip")
    {
    this.mc_bild[i].removeMovieClip ();
    }
    }
    tiefe = 0;
    for (var i = 0; i < spielLevel[0].length; i++)
    {
    for (var j = 0; j < spielLevel.length; j++)
    {
    nName = "block_" + i + "_" + j;
    this.mc_bild.attachMovie ("contclip", nName, tiefe++);
    this.mc_bild[nName].nummer = i;
    this.mc_bild[nName].bildname = "daten/" + spielLevel[j][i];
    this.mc_bild[nName]._x = posX + pB * i * 1.2;
    this.mc_bild[nName]._y = posY + pW * j * 1.2;
    this.mc_bild[nName].onRelease = function ()
    {
    this._parent._parent.createEmptyMovieClip ("inhalt", 1000);
    this._parent._parent.inhalt.attachMovie ("grosscontclip", "grossclip", 1);
    this._parent._parent.inhalt.grossclip.bildname = this.bildname;
    this._parent._parent.inhalt.grossclip._x = 470;
    this._parent._parent.inhalt.grossclip._y = 245;
    this._parent._parent.inhalt.grossclip._yscale = 50;
    this._parent._parent.inhalt.grossclip._xscale = 50;
    this._parent._parent.inhalt.grossclip.leiste_mc.onMouseMove = function ()
    {
    updateAfterEvent ();
    };
    };
    }
    }
    }

    var seite:Number = 0;

    // Schaltflächen
    w_btn.onRelease = function ()
    {
    if (seite < alleBilder.length - max)
    {
    seite += max;
    setArray (seite);
    }
    };
    z_btn.onRelease = function ()
    {
    if (seite > 0)
    {
    seite -= max;
    setArray (seite);
    }
    };