| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Neuer User Registriert seit: May 2006
Beiträge: 79
| actionscript
hallo! ich hoffe mir kann jm. helfen, wäre super! mache es kurz: dies ist das sccript einer dynamischen bildergalerie. 4 kategorien mit thumbs. WIE KANN ICH KATEGORIEN HINZUFÜGEN (jede kat. ist glaub ich ein separater movieclip) irgendwas mit container spielt auch ne rolle hab schon rumprobiert, klappt nur nicht... VIELEN DANK!!!var tnNr; //abstand des rahmens zum bild spacing = 20; container._alpha = 0; var curLength; MovieClip.prototype.loadPic = function(pic, id) { info.text = ""; this._alpha = 0; this.loadMovie(pic); temp = this._parent.createEmptyMovieClip("temp2", 998); temp.onEnterFrame = function() { var t = container.getBytesTotal(), l = container.getBytesLoaded(); if (Math.round(l/t) == 1 && container._width != 0 && container._height != 0) { var w = container._width+spacing, h = container._height+spacing; border.resizeMe(w, h, id); delete this.onEnterFrame; } }; }; MovieClip.prototype.resizeMe = function(w, h, id) { var speed = 4; // geschwindigkeit des bildwechsels container._alpha = 0; this.onEnterFrame = function() { this._width += (w-this._width)/speed; this._height += (h-this._height)/speed; if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) { this._width = w; this._height = h; container._x = this._x-this._width/2+spacing/2; // position der bilder im rahmen container._y = this._y-this._height/2+spacing/2; info._y = Math.round(this._y+this._height/2+spacing/2); container._alpha += 5; //alphawert der bilder if (container._alpha>90) { info.text = id; container._alpha = 100; //alphawert der bilder nach erscheinen delete this.onEnterFrame; } } }; }; function galleryChoice(q) { pArray = new Array(); tArray = new Array(); iArray = new Array(); my_xml = new XML(); for (var j = 0; j<curLength; j++) { this.th_nav["thmb"+j].removeMovieClip(); } my_xml.ignoreWhite = true; my_xml.onLoad = function(loaded) { if (loaded) { gallery = this.firstChild.childNodes[q]; curLength = gallery.childNodes.length; for (var i = 0; i<gallery.childNodes.length; i++) { pArray.push(gallery.childNodes[i].attributes.source); tArray.push(gallery.childNodes[i].attributes.thumb); iArray.push(gallery.childNodes[i].attributes.title); } } delay = setInterval(makeButtons, 50); }; my_xml.load("gallery.xml"); } function makeButtons() { tnNr = 0; //gibt an, wieviele thumbs unsichtbar sein sollen clearInterval(delay); for (var i = 0; i<tArray.length; i++) { var thb = th_nav.thmb.duplicateMovieClip("thmb"+i, 1000+i); thb.id = i; thb._x = i%3*60; //3 steht für die spaltenanzahl der thumbs; 50 für die abstände zw. den thumbs thb._y = Math.floor(i/3)*50; } loadButtons(); } function loadButtons() { var tbox = th_nav["thmb"+tnNr].box; tbox.loadMovie(tArray[tnNr]); temp = this.createEmptyMovieClip("tmp"+tnNr, 999); temp.onEnterFrame = function() { bt = tbox.getBytesTotal(); bl = tbox.getBytesLoaded(); if (bt == bl && bt>4) { nextButton(); delete this.onEnterFrame; } }; } function nextButton() { if (tnNr<tArray.length-1) { tnNr++; loadButtons(); } else { activateButtons(); } } function activateButtons() { mainButtons(); for (var i = 0; i<pArray.length; i++) { var but = th_nav["thmb"+i]; but.id = i; but.onRelease = function() { container.loadPic(pArray[this.id], iArray[this.id]); disButtons2(this.id); }; } container.loadPic(pArray[0], iArray[0]); disButtons2(0); } butArray = new Array(); butArray = ["gal1_btn", "gal2_btn", "gal3_btn", "gal4_btn"]; function mainButtons() { for (var i = 0; i<butArray.length; i++) { this[butArray[i]].id = i; this[butArray[i]].onRelease = function() { galleryChoice(this.id); disButtons(this.id); }; } } function disButtons2(d) { for (var i = 0; i<tArray.length; i++) { if (i != d) { this.th_nav["thmb"+i].enabled = 1; this.th_nav["thmb"+i].box._alpha = 100; //alphawert der thumbs im normalzustand } else { this.th_nav["thmb"+i].enabled = 0; this.th_nav["thmb"+i].box._alpha = 20; //alphawert der thumbs im gedrückten zustand } } } function disButtons(d) { for (var i = 0; i<butArray.length; i++) { if (i != d) { this[butArray[i]].enabled = 1; this[butArray[i]].gotoAndStop(1); } else { this[butArray[i]].enabled = 0; this[butArray[i]].gotoAndStop(2); } } } disButtons(0); galleryChoice(0); |
| | |
| | #3 (permalink) |
| Flashworker Registriert seit: Nov 2001 Ort: Wiesbaden
Beiträge: 10.945
|
Einrückungen und Code Tags sind was feines.. Sowas geht ja noch bei 5 Zeilen Code, aber was ist das bitte? ![]() ActionScript:
Geändert von sebastian (09-07-2006 um 12:03 Uhr) |
| | |
| | #4 (permalink) |
| Neuer User Registriert seit: May 2006
Beiträge: 79
|
das passende xml-dokument ist dieses hier: <?xml version="1.0" encoding="UTF-8"?> <menu> <gallery name="galerie1"> <image source="pics/pic63.jpg" thumb="pics/th63.jpg"/> <image source="pics/pic64.jpg" thumb="pics/th64.jpg"/> <image source="pics/pic67.jpg" thumb="pics/th67.jpg"/> <image source="pics/pic66.jpg" thumb="pics/th66.jpg"/> <image source="pics/pic65.jpg" thumb="pics/th65.jpg"/> <image source="pics/pic68.jpg" thumb="pics/th68.jpg"/> <image source="pics/pic5.jpg" thumb="pics/th5.jpg"/> <image source="pics/pic6.jpg" thumb="pics/th6.jpg"/> <image source="pics/pic7.jpg" thumb="pics/th7.jpg"/> <image source="pics/pic8.jpg" thumb="pics/th8.jpg"/> <image source="pics/pic26.jpg" thumb="pics/th26.jpg"/> <image source="pics/pic74.jpg" thumb="pics/th74.jpg"/> <image source="pics/pic10.jpg" thumb="pics/th10.jpg"/> <image source="pics/pic75.jpg" thumb="pics/th75.jpg"/> <image source="pics/pic77.jpg" thumb="pics/th77.jpg"/> <image source="pics/pic76.jpg" thumb="pics/th76.jpg"/> <image source="pics/pic9.jpg" thumb="pics/th9.jpg"/> <image source="pics/pic46.jpg" thumb="pics/th46.jpg"/> <image source="pics/pic47.jpg" thumb="pics/th47.jpg"/> <image source="pics/pic48.jpg" thumb="pics/th48.jpg"/> <image source="pics/pic49.jpg" thumb="pics/th49.jpg"/> <image source="pics/pic51.jpg" thumb="pics/th51.jpg"/> <image source="pics/pic52.jpg" thumb="pics/th52.jpg"/> <image source="pics/pic53.jpg" thumb="pics/th53.jpg"/> <image source="pics/pic54.jpg" thumb="pics/th54.jpg"/> <image source="pics/pic73.jpg" thumb="pics/th73.jpg"/> <image source="pics/pic70.jpg" thumb="pics/th70.jpg"/> </gallery> <gallery name="galerie2"> <image source="pics/pic11.jpg" thumb="pics/th11.jpg"/> <image source="pics/pic12.jpg" thumb="pics/th12.jpg"/> <image source="pics/pic13.jpg" thumb="pics/th13.jpg"/> <image source="pics/pic14.jpg" thumb="pics/th14.jpg"/> <image source="pics/pic15.jpg" thumb="pics/th15.jpg"/> <image source="pics/pic16.jpg" thumb="pics/th16.jpg"/> <image source="pics/pic17.jpg" thumb="pics/th17.jpg"/> <image source="pics/pic18.jpg" thumb="pics/th18.jpg"/> <image source="pics/pic19.jpg" thumb="pics/th19.jpg"/> <image source="pics/pic20.jpg" thumb="pics/th20.jpg"/> <image source="pics/pic21.jpg" thumb="pics/th21.jpg"/> <image source="pics/pic22.jpg" thumb="pics/th22.jpg"/> <image source="pics/pic23.jpg" thumb="pics/th23.jpg"/> <image source="pics/pic24.jpg" thumb="pics/th24.jpg"/> <image source="pics/pic25.jpg" thumb="pics/th25.jpg"/> <image source="pics/pic33.jpg" thumb="pics/th33.jpg"/> <image source="pics/pic34.jpg" thumb="pics/th34.jpg"/> <image source="pics/pic35.jpg" thumb="pics/th35.jpg"/> </gallery> <gallery name="galerie3"> <image source="pics/pic27.jpg" thumb="pics/th27.jpg"/> <image source="pics/pic28.jpg" thumb="pics/th28.jpg"/> <image source="pics/pic29.jpg" thumb="pics/th29.jpg"/> <image source="pics/pic30.jpg" thumb="pics/th30.jpg"/> <image source="pics/pic31.jpg" thumb="pics/th31.jpg"/> <image source="pics/pic58.jpg" thumb="pics/th58.jpg"/> <image source="pics/pic59.jpg" thumb="pics/th59.jpg"/> <image source="pics/pic60.jpg" thumb="pics/th60.jpg"/> <image source="pics/pic61.jpg" thumb="pics/th61.jpg"/> <image source="pics/pic62.jpg" thumb="pics/th62.jpg"/> <image source="pics/pic71.jpg" thumb="pics/th71.jpg"/> </gallery> <gallery name="galerie4"> <image source="pics/pic1.jpg" thumb="pics/th1.jpg"/> <image source="pics/pic2.jpg" thumb="pics/th2.jpg"/> <image source="pics/pic3.jpg" thumb="pics/th3.jpg"/> <image source="pics/pic4.jpg" thumb="pics/th4.jpg"/> <image source="pics/pic36.jpg" thumb="pics/th36.jpg"/> <image source="pics/pic37.jpg" thumb="pics/th37.jpg"/> <image source="pics/pic38.jpg" thumb="pics/th38.jpg"/> <image source="pics/pic39.jpg" thumb="pics/th39.jpg"/> <image source="pics/pic40.jpg" thumb="pics/th40.jpg"/> <image source="pics/pic41.jpg" thumb="pics/th41.jpg"/> <image source="pics/pic42.jpg" thumb="pics/th42.jpg"/> <image source="pics/pic43.jpg" thumb="pics/th43.jpg"/> <image source="pics/pic44.jpg" thumb="pics/th44.jpg"/> <image source="pics/pic45.jpg" thumb="pics/th45.jpg"/> <image source="pics/pic69.jpg" thumb="pics/th69.jpg"/> <image source="pics/pic72.jpg" thumb="pics/th72.jpg"/> </gallery> |
| | |
| | #5 (permalink) |
| Flash... Registriert seit: Dec 2005 Ort: Österreich
Beiträge: 961
|
1. wieso nennst du deine Knoten gleich?? 2. Hups hast du eh (ich muss genauer lesen)
__________________ :: Maske an Führungspfad entlanglaufen lassen - Beispieldateien :: Textdatei auslesen und durch Trennungszeichen in mehrere Strings splitten [STUFF]: Preloader [TUTORIAL]: Skalierung und Ausrichtung von MCs Geändert von Scheidlf (09-07-2006 um 14:28 Uhr) |
| | |
| | #7 (permalink) |
| Flash... Registriert seit: Dec 2005 Ort: Österreich
Beiträge: 961
|
wenn du so eins PHP-Code: also für jeden Knoten (das oben ist einer) wird eine Kategorie dazugefügt.
__________________ :: Maske an Führungspfad entlanglaufen lassen - Beispieldateien :: Textdatei auslesen und durch Trennungszeichen in mehrere Strings splitten [STUFF]: Preloader [TUTORIAL]: Skalierung und Ausrichtung von MCs |
| | |
| | #8 (permalink) | |
| Flashworker Registriert seit: Nov 2001 Ort: Wiesbaden
Beiträge: 10.945
| Zitat:
was runtergeladen und poste mal die 200 Zeilen und lass es mir umschreiben... Muss leider mal wieder den Kopf schütteln, aber vielleicht arbeitet sich da ja wirklich jemand rein. greetz | |
| | |
| | #9 (permalink) |
| Neuer User Registriert seit: May 2006
Beiträge: 79
|
danke @scheidlf. hab das schon versucht, es funktioniert nicht. müsste ja theoretisch noch einen weiteren movieclip (jedes wort, also jede kategorie ist ein movieclip) hinzufügen. hab das versucht indem ich einen movieclip kopiert habe, aber sobald ich das gemacht habe, kann ich das wort nicht mehr anklicken. @sebastian. 1. hab ich ahnung in flash. (es gibt aber eben auch sachen wie diese, die ich nicht drauf hab) und 2. hab ich schon soweit alles selbst versucht wie es geht und bin gescheitert... ach ja, und 3. ist das hier doch ein forum für fragen bezüglich flash, oder irre ich mich da? sorry, aber solche antworten sind sowas von überhaupt gar nicht hilfreich... das ärgert mich, wenn einem unterstellt wird, man habe nur kopiert und will anderen die arbeit überlassen... du weißt nicht wie lange ich daran schon herum probiere... gruß, julia |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |