Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 06-06-2005, 02:35   #1 (permalink)
Neuer User
 
Benutzerbild von hela66
 
Registriert seit: Nov 2004
Ort: Berlin
Beiträge: 20
Array dynamisches Menü + scrollen

Hallo, habe ein Problem mit meinem Array. Ich versuche ein Dynamisches Menü in einem MC namens „thumbs“ zu erstellen. Im dem MC „thumbs“ erstelle ich wiederum Buttons die ich mit entsprechenden Funktionen belege. In den Buttons erstelle ich einen MC der sich „thumb“ nennt, hier sollen dann mit loadMovie die kleinen jpgs geladen werden. Mein Problem ist, dass sich immer nur das erste jpg in die Buttons lädt und ich somit 40 Buttons mit dem gleichen Bild habe!! Hilfe.

Hier was ich bis jetzt habe:
ActionScript:
  1. _root.createEmptyMovieClip("thumbs", 20);
  2. _root.thumbs.createEmptyMovieClip("lade_", 30);
  3. _root.thumbs._x = 297;
  4. _root.thumbs._y = 113;
  5. yPos = _root['thumbs']['lade_']._y;
  6.  
  7. pics = new Array();
  8. textBild = new Array();
  9. thumbsMC = new Array();
  10. for (i=1; i<=pics_slub; i++) {
  11.     var picsZiel = this['dynTxt']['slub_filename'+[i]]+".jpg";
  12.     var textZiel = this['dynTxt']['slub_title'+[i]];
  13.     var thumbsZiel = this['dynTxt']['slub_filename'+[i]]+"_thumb.jpg";
  14.     //trace(this['dynTxt']['slub_filename'+[i]]+"_thumb.jpg");
  15.     duplicateMovieClip(_root['thumbs']['lade_'], "lade_"+i, i);
  16.     _root['thumbs']['lade_'+[i]].createEmptyMovieClip("thumb", 50);
  17.     trace(_root['thumbs']['lade_20']['thumb']);
  18.     //duplicateMovieClip(_root['thumbs']['lade_']['thumb'], "thumb"+i, i);
  19.     _root['thumbs']['lade_'+[i]]._y = yPos;
  20.     yPos += 50;
  21.     pics[i-1] = picsZiel;
  22.     textBild[i-1] = textZiel;
  23.     thumbsMC[i-1] = thumbsZiel;
  24.     this['titel'].text.ID = i;
  25.     this['thumbs']['lade_'+[i]].ID = i;
  26.     this['thumbs']['lade_'+[i]]['thumb'].loadMovie(thumbsMC[this.ID-1]);
  27.     this['thumbs']['lade_'+[i]].onPress = function() {
  28.         ladestatus();
  29.         _root.ladeziel._alpha = 0;
  30.         _root.ladeziel.loadMovie(pics[this.ID-1]);
  31.         _root.titel.text = (textBild[this.ID-1]);
  32.         fadeIn();
  33.         txtFeld();
  34.     };
  35. }

Im zweiten Teil möchte ich den MC „thumbs“ scrollen lassen anhand der Mausposition, soll heißen wenn ich im oberen bereich des MCs bin scrolle ich noch oben u.s.w. natürlich sollte das scrollen auch aufhören damit der MC nicht aus dem Bild läuft.

Hier was ich bis jetzt habe:
ActionScript:
  1. this.onEnterFrame = function() {
  2.     if (_ymouse>=113 && _ymouse<=213 && _xmouse>=297 && _xmouse<=324 && _root['thumbs']._y>=(_root['thumbs']._height-(8*50)-113)*-1) {
  3.     _root['thumbs']._y -= 4;
  4.     }
  5.     if (_ymouse>=413 && _ymouse<=513 && _xmouse>=297 && _xmouse<=324 && _root['thumbs']._y>=(_root['thumbs']._height-(8*50)-113)*-1) {
  6.     _root['thumbs']._y += 4;
  7.     }
  8. };

Zu guter Letzt möchte ich noch eine Maske für das Menü definieren damit jetzt die 40 Buttons mir nicht über den ganzen Bildschirm scrollen! Dazu habe ich keine. Ich erinnere noch mal, dass alles dynamisch erzeugt wird!

Nochmals Danke für die Hilfe im Voraus!
hela66 ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 10:39 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele