PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
Webdesign: HTML/CSS, Responsive Design, Sass...
Bildergalerie/Bilderfolge umdrehen
Beitrag
<blockquote data-quote="DaFunsel" data-source="post: 1371305"><p>Hallo zusammen.</p><p>Ich habe mir vor einiger Zeit eine Bildergalerie gefunden. Ich lade mit folgendem Script meine Bilder per Klick auf "Vor" bzw. "Zurück":</p><p>[CODE][COLOR=#0000ff]on[/COLOR] ([COLOR=#0000ff]release[/COLOR]) {</p><p> </p><p> [COLOR=#0000ff]if[/COLOR] (a<[COLOR=#0000ff]_parent[/COLOR].bilderanzahl) {</p><p> a = a+1;</p><p> } [COLOR=#0000ff]else[/COLOR] {</p><p> a = 1;</p><p> }</p><p> t = t+1;</p><p> [COLOR=#0000ff]if[/COLOR] (movie_1.[COLOR=#0000ff]_visible[/COLOR].[COLOR=#0000ff]true[/COLOR]) {</p><p> movie_1.[COLOR=#0000ff]_visible[/COLOR].[COLOR=#0000ff]false[/COLOR];</p><p> movie_2.[COLOR=#0000ff]_visible[/COLOR].[COLOR=#0000ff]true[/COLOR];</p><p> [COLOR=#0000ff]loadMovie[/COLOR]([COLOR=#009900]"bilder/sr"[/COLOR]+a+[COLOR=#009900]".jpg"[/COLOR], [COLOR=#0000ff]_root[/COLOR].bild1.bild_innen1);</p><p> [COLOR=#0000ff]_root[/COLOR].bild1.bild_innen1.[COLOR=#0000ff]swapDepths[/COLOR](t);</p><p> bild1.[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#0000ff]function[/COLOR]() {</p><p> [COLOR=#0000ff]if[/COLOR] ([COLOR=#0000ff]this[/COLOR].bild_innen1.[COLOR=#0000ff]_height[/COLOR]) {</p><p> [COLOR=#0000ff]delete[/COLOR] [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onEnterFrame[/COLOR];</p><p> [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]_x[/COLOR] = (614-[COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]width[/COLOR])/2+([COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]width[/COLOR]-[COLOR=#0000ff]this[/COLOR].bild_innen1.[COLOR=#0000ff]_width[/COLOR])/2;</p><p> [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]_y[/COLOR] = (550-[COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]height[/COLOR])/2+([COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]height[/COLOR]-[COLOR=#0000ff]this[/COLOR].bild_innen1.[COLOR=#0000ff]_height[/COLOR])/2;</p><p> }</p><p> };</p><p> } [COLOR=#0000ff]else[/COLOR] {</p><p> movie_1.[COLOR=#0000ff]_visible[/COLOR].[COLOR=#0000ff]true[/COLOR];</p><p> movie_2.[COLOR=#0000ff]_visible[/COLOR].[COLOR=#0000ff]false[/COLOR];</p><p> [COLOR=#0000ff]loadMovie[/COLOR]([COLOR=#009900]"bilder/sr"[/COLOR]+a+[COLOR=#009900]".jpg"[/COLOR], [COLOR=#0000ff]_root[/COLOR].bild2.bild_innen2);</p><p> [COLOR=#0000ff]_root[/COLOR].bild2.bild_innen2.[COLOR=#0000ff]swapDepths[/COLOR](t);</p><p> bild2.[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#0000ff]function[/COLOR]() {</p><p> [COLOR=#0000ff]if[/COLOR] ([COLOR=#0000ff]this[/COLOR].bild_innen2.[COLOR=#0000ff]_height[/COLOR]) {</p><p> [COLOR=#0000ff]delete[/COLOR] [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onEnterFrame[/COLOR];</p><p> [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]_x[/COLOR] = (614-[COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]width[/COLOR])/2+([COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]width[/COLOR]-[COLOR=#0000ff]this[/COLOR].bild_innen2.[COLOR=#0000ff]_width[/COLOR])/2;</p><p> [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]_y[/COLOR] = (550-[COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]height[/COLOR])/2+([COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]height[/COLOR]-[COLOR=#0000ff]this[/COLOR].bild_innen2.[COLOR=#0000ff]_height[/COLOR])/2;</p><p> }</p><p> };</p><p> }</p><p> myData = [COLOR=#0000ff]new[/COLOR] [COLOR=#0000ff]LoadVars[/COLOR] ();</p><p> myData.[COLOR=#0000ff]onLoad[/COLOR] = [COLOR=#0000ff]function[/COLOR] (success) {</p><p> [COLOR=#0000ff]if[/COLOR] (success) {</p><p> infos.[COLOR=#0000ff]text[/COLOR] = myData[[COLOR=#009900]"beschreibung"[/COLOR] + a];</p><p> [COLOR=#0000ff]for[/COLOR] (i = 0; i < myData.bilderanzahl; i++) {</p><p> [COLOR=#0000ff]trace[/COLOR] (myData[[COLOR=#009900]"beschreibung"[/COLOR] + i]);</p><p> }</p><p> }</p><p> [COLOR=#0000ff]else[/COLOR] {</p><p> [COLOR=#0000ff]trace[/COLOR] ([COLOR=#009900]"laden vergeschlagen"[/COLOR]);</p><p> }</p><p> };</p><p> myData.[COLOR=#0000ff]load[/COLOR] ([COLOR=#009900]"info.txt"[/COLOR]);</p><p>}[/CODE]</p><p></p><p>Habe zudem ein dynamisches Textfeld, indem für jedes Bild die Info aus einer .txt geladen wird.</p><p>Das läuft alles wunderbar. Nur jetzt stellt sich mir die Frage, was machen, wenn man die Bilder die neu dazukommen, als erstes angezeigt bekommen mag? Ich müsste ja dann aufwendig die Bildernamen komplett invertieren und das jedesmal, wenn ein neues Bild dazukommt, damit es "sr1" heißt. Zudem müsste ich die Beschreibungen in der .txt genauso umdrehen. </p><p>Hätte da jemand eine einfache Idee? Ich würde mich total freuen.</p><p></p><p>-->LG<--</p></blockquote><p></p>
[QUOTE="DaFunsel, post: 1371305"] Hallo zusammen. Ich habe mir vor einiger Zeit eine Bildergalerie gefunden. Ich lade mit folgendem Script meine Bilder per Klick auf "Vor" bzw. "Zurück": [CODE][COLOR=#0000ff]on[/COLOR] ([COLOR=#0000ff]release[/COLOR]) { [COLOR=#0000ff]if[/COLOR] (a<[COLOR=#0000ff]_parent[/COLOR].bilderanzahl) { a = a+1; } [COLOR=#0000ff]else[/COLOR] { a = 1; } t = t+1; [COLOR=#0000ff]if[/COLOR] (movie_1.[COLOR=#0000ff]_visible[/COLOR].[COLOR=#0000ff]true[/COLOR]) { movie_1.[COLOR=#0000ff]_visible[/COLOR].[COLOR=#0000ff]false[/COLOR]; movie_2.[COLOR=#0000ff]_visible[/COLOR].[COLOR=#0000ff]true[/COLOR]; [COLOR=#0000ff]loadMovie[/COLOR]([COLOR=#009900]"bilder/sr"[/COLOR]+a+[COLOR=#009900]".jpg"[/COLOR], [COLOR=#0000ff]_root[/COLOR].bild1.bild_innen1); [COLOR=#0000ff]_root[/COLOR].bild1.bild_innen1.[COLOR=#0000ff]swapDepths[/COLOR](t); bild1.[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#0000ff]function[/COLOR]() { [COLOR=#0000ff]if[/COLOR] ([COLOR=#0000ff]this[/COLOR].bild_innen1.[COLOR=#0000ff]_height[/COLOR]) { [COLOR=#0000ff]delete[/COLOR] [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onEnterFrame[/COLOR]; [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]_x[/COLOR] = (614-[COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]width[/COLOR])/2+([COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]width[/COLOR]-[COLOR=#0000ff]this[/COLOR].bild_innen1.[COLOR=#0000ff]_width[/COLOR])/2; [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]_y[/COLOR] = (550-[COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]height[/COLOR])/2+([COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]height[/COLOR]-[COLOR=#0000ff]this[/COLOR].bild_innen1.[COLOR=#0000ff]_height[/COLOR])/2; } }; } [COLOR=#0000ff]else[/COLOR] { movie_1.[COLOR=#0000ff]_visible[/COLOR].[COLOR=#0000ff]true[/COLOR]; movie_2.[COLOR=#0000ff]_visible[/COLOR].[COLOR=#0000ff]false[/COLOR]; [COLOR=#0000ff]loadMovie[/COLOR]([COLOR=#009900]"bilder/sr"[/COLOR]+a+[COLOR=#009900]".jpg"[/COLOR], [COLOR=#0000ff]_root[/COLOR].bild2.bild_innen2); [COLOR=#0000ff]_root[/COLOR].bild2.bild_innen2.[COLOR=#0000ff]swapDepths[/COLOR](t); bild2.[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#0000ff]function[/COLOR]() { [COLOR=#0000ff]if[/COLOR] ([COLOR=#0000ff]this[/COLOR].bild_innen2.[COLOR=#0000ff]_height[/COLOR]) { [COLOR=#0000ff]delete[/COLOR] [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onEnterFrame[/COLOR]; [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]_x[/COLOR] = (614-[COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]width[/COLOR])/2+([COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]width[/COLOR]-[COLOR=#0000ff]this[/COLOR].bild_innen2.[COLOR=#0000ff]_width[/COLOR])/2; [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]_y[/COLOR] = (550-[COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]height[/COLOR])/2+([COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]height[/COLOR]-[COLOR=#0000ff]this[/COLOR].bild_innen2.[COLOR=#0000ff]_height[/COLOR])/2; } }; } myData = [COLOR=#0000ff]new[/COLOR] [COLOR=#0000ff]LoadVars[/COLOR] (); myData.[COLOR=#0000ff]onLoad[/COLOR] = [COLOR=#0000ff]function[/COLOR] (success) { [COLOR=#0000ff]if[/COLOR] (success) { infos.[COLOR=#0000ff]text[/COLOR] = myData[[COLOR=#009900]"beschreibung"[/COLOR] + a]; [COLOR=#0000ff]for[/COLOR] (i = 0; i < myData.bilderanzahl; i++) { [COLOR=#0000ff]trace[/COLOR] (myData[[COLOR=#009900]"beschreibung"[/COLOR] + i]); } } [COLOR=#0000ff]else[/COLOR] { [COLOR=#0000ff]trace[/COLOR] ([COLOR=#009900]"laden vergeschlagen"[/COLOR]); } }; myData.[COLOR=#0000ff]load[/COLOR] ([COLOR=#009900]"info.txt"[/COLOR]); }[/CODE] Habe zudem ein dynamisches Textfeld, indem für jedes Bild die Info aus einer .txt geladen wird. Das läuft alles wunderbar. Nur jetzt stellt sich mir die Frage, was machen, wenn man die Bilder die neu dazukommen, als erstes angezeigt bekommen mag? Ich müsste ja dann aufwendig die Bildernamen komplett invertieren und das jedesmal, wenn ein neues Bild dazukommt, damit es "sr1" heißt. Zudem müsste ich die Beschreibungen in der .txt genauso umdrehen. Hätte da jemand eine einfache Idee? Ich würde mich total freuen. -->LG<-- [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 5, ▼ = 2 und ■ = 7, was ist ▲ × ▼ + ■?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
Webdesign: HTML/CSS, Responsive Design, Sass...
Bildergalerie/Bilderfolge umdrehen
Oben