mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Fr 29.03.2024 13:58 Benutzername: Passwort: Auto-Login

Thema: Galerie Pager AS2 vom 20.08.2010


Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Multimedia -> Galerie Pager AS2
Autor Nachricht
aphexZero
Threadersteller

Dabei seit: 19.08.2010
Ort: -
Alter: -
Geschlecht: -
Verfasst Fr 20.08.2010 00:51
Titel

Galerie Pager AS2

Antworten mit Zitat Zum Seitenanfang

Hallo,
Ich habe mir das "Alle meine Kinder"-Tutorial angesehen, aber ich habe dazu noch eine Frage:
Kann man das auf eine weitere Ebene erweitern?
Wie kann ich die Bilder in Schalter ändern und eine Galerie pro Bild daraus machen?

Ziel ist es eine XML für Projekte mit einem Bild zu nehmen (8x2 Bilder) und dann durch klick
eine Galerie des Projekts anzuzeigen.

Gruß,
aphexZero
  View user's profile Private Nachricht senden
aphexZero
Threadersteller

Dabei seit: 19.08.2010
Ort: -
Alter: -
Geschlecht: -
Verfasst Di 24.08.2010 01:08
Titel

Antworten mit Zitat Zum Seitenanfang

Okay, habe schon herausgefunden dass die Skalierung von Flash auch so funktioniert.
Wenn ein Bild bei 100px x 100px platziert wird, wird es entsprechend plaziert.

Wie mach ich die Dinger aber anklickbar?

Code:
var Project_arr:Array = new Array();   // the array that collects it all
var Project_xml:XML = new XML();   // XML-object to load and parse the XML-file
Project_xml.ignoreWhite = true;   // ignore Whitespace in the XML-file

Project_xml.onLoad = function(success:Boolean) {
   switch(success) {
      //
      // SUCCESS: XML loaded
      case true:
      trace("XML successfully loaded..." + this.firstChild.childNodes.length + " projects in line"); // count of projects
         for(var i:Number = 0; i < this.firstChild.childNodes.length; i++) { // for every <project>
            var _node1:XMLNode = this.firstChild.childNodes[i];   // # of Nodes in <project>
            Project_arr.push(new Object()); // create an Object for this Project
            trace ("Projects registered: " + Project_arr.length); // trace # of P-Objects
            var _obj:Object = Project_arr[i]; // this Project
            
            for(var n:Number = 0; n < _node1.childNodes.length; n++){
               var _node2:XMLNode = _node1.childNodes[n];
               trace ("subNodes: " + _node2.childNodes.length + " nodeName: " + _node2.nodeName); // trace <image>
               // in this version all information comes from attributes and the image is the single child
               //
               var _item:Object = _obj[_node2.nodeName] = new Object();
            }
         }
      break;
      //
      // ERROR: if something went wrong with the XML-file
      case false:
      trace("Error loading the XML-file!");
      break;
   }
};

Project_xml.load("encours_fr3.xml");   // fetch the XML


Zitat:
<?xml version="1.0" encoding="utf-8"?>
<projects>
<project pid="9" title="CASA A2S" year="2004" type="RÉSIDENCES" location="TUNISIE">
<image>/pictures/encours/9.jpg</image>
</project>
<project pid="49" title="KTBIO&BIS" year="2009" type="BUREAUX/INDUSTRIES" location="TUNISIE">
<image>/pictures/encours/49.jpg</image>
</project>
<project pid="9" title="CASA A2S" year="2004" type="RÉSIDENCES" location="TUNISIE">
<image>/pictures/encours/9.jpg</image>
</project>
<project pid="49" title="KTBIO&BIS" year="2009" type="BUREAUX/INDUSTRIES" location="TUNISIE">
<image>/pictures/encours/49.jpg</image>
</project>
<project pid="9" title="CASA A2S" year="2004" type="RÉSIDENCES" location="TUNISIE">
<image>/pictures/encours/9.jpg</image>
</project>
<project pid="49" title="KTBIO&BIS" year="2009" type="BUREAUX/INDUSTRIES" location="TUNISIE">
<image>/pictures/encours/49.jpg</image>
</project>
<project pid="9" title="CASA A2S" year="2004" type="RÉSIDENCES" location="TUNISIE">
<image>/pictures/encours/9.jpg</image>
</project>
<project pid="49" title="KTBIO&BIS" year="2009" type="BUREAUX/INDUSTRIES" location="TUNISIE">
<image>/pictures/encours/49.jpg</image>
</project>
</projects>
  View user's profile Private Nachricht senden
Anzeige
Anzeige
 
Ähnliche Themen DMS Galerie
PDF Galerie
[PS CS4] Web-Galerie
PHP Galerie
flashnifties galerie
flash galerie
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.