Zurück   Flashforum > Flash und Server > Flash und Datenbanken

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 12-03-2009, 10:54   #1 (permalink)
Neuer User
 
Registriert seit: Jan 2009
Beiträge: 15
2 SWF Ladeproblem von xml daten?

Hallo zusammen,
ich hab ein kleines Problem mit 2 SwF dateien. Ich lade in mein erstes SWF, Daten in Comboboxen aus einem Xml. Betätige ich nun ein button um mein zweites Swf zu öffnen werden die xml-Daten in diesem swf nicht mehr geladen. Gehe ich wieder zurück auf erste swf werden diese ebenfals nicht mehr geladen.

PHP-Code:
onLoad = function() {
    
_root.auswahltext._visible=false;
    
_root.suche._visible=false;
    
_root.requestObjects("http://localhost/campus/campus.php");
}
stop();

this.myObjectXML = new XML();
this.myObjectXML.ignoreWhite true;
this.myObjectXML.onLoad = function(sucess) { importObjects(sucess); }

//Arrays mit allen Daten
this.myObjectBau = new Array();
this.myObjectFak = new Array();
this.myObjectPer = new Array();
this.myObjectRau = new Array();


// Hilfsvariablen + Arrays für comboboxen anlegen
var building = new Array();        
var 
fakName = new Array();
var 
room = new Array();
var 
perName = new Array();

//zusätzliche angaben für combobox
this.building.push("Wählen Sie");
this.fakName.push("Wählen Sie");
this.room.push("Wählen Sie");
this.perName.push("Wählen Sie");

// Füllen der arrays aus dem Xml
function importObjects(sucess) {
    if(
sucess) {
        var 
xmlTarget this.myObjectXML.firstChild;
        if (
xmlTarget.nodeName == "campus") {
            for(var 
i=0i<xmlTarget.childNodes.lengthi++) {
                if (
xmlTarget.childNodes[i].nodeName == "bau") {
                    
this.building.push(xmlTarget.childNodes[i].attributes.building_name);
                }
                if(
xmlTarget.childNodes[i].nodeName == "fak") {
                    
this.fakName.push(xmlTarget.childNodes[i].attributes.course);
                }
                if(
xmlTarget.childNodes[i].nodeName == "rau") {
                    
this.room.push(xmlTarget.childNodes[i].attributes.rooms_id);
                }
                if(
xmlTarget.childNodes[i].nodeName == "per") {
                    
this.perName.push(xmlTarget.childNodes[i].attributes.surname);
                }
                if(
xmlTarget.childNodes[i].nodeName == "bau") {
                    
this.myObjectBau.push(xmlTarget.childNodes[i].attributes);
                    
                }
                if(
xmlTarget.childNodes[i].nodeName == "fak") {
                    
this.myObjectFak.push(xmlTarget.childNodes[i].attributes);
                    
                }
                if(
xmlTarget.childNodes[i].nodeName == "rau") {
                    
this.myObjectRau.push(xmlTarget.childNodes[i].attributes);
                    
                }
                if(
xmlTarget.childNodes[i].nodeName == "per") {
                    
this.myObjectPer.push(xmlTarget.childNodes[i].attributes);
                }
            }        
        }
    
delete(this.myObjectXML);
    
this.coBoData(this.cb_baubuilding);
    
this.coBoData(this.cb_fakfakName);
    
this.coBoData(this.cb_rauroom);
    
this.coBoData(this.cb_perperName);
    }
}
function 
requestObjects(MyRequestURL) {
    
this.myObjectXML.load(MyRequestURL);
}

// auswahl anzeigen

objComboListener = new Object();
objComboListener.change = function(eventObj){
    
_root.auswahl_cb.text eventObj.target.value;
    
_root.auswahltext._visible true;
    
_root.suche._visible true;
/*    
    var building = "KBau";
    var frame = "_f2";
    var clipID = building + frame;
    var test = "KBau_f2";
    var myClip = new MovieClip();
    

    function myClip(ID) {
    var infobuilding;
    var frame;
    //var clipID = infobuilding + frame;
    for(var i=0; i < this.myObjectBau.length; i++) {
        if(this.myObjectBau[i].building_name == ID) {
            infobuilding = this.myObjectBau[i].building_name + frame;
            break;
        }
    }
*/    
    
var currentFrameCampus _root.campus._currentframe;
    var 
myClip;
    switch(
currentFrameCampus) {
       case 
1myClip "_f2";
     break;
    case 
2myClip "_f2";
    break;
    case 
12myClip "_f3";
    break;
    case 
26myClip "_f4";
    break;
    case 
40myClip "_f1";
    break;
    default: 
myClip "_f2";
    break;
    }
    
trace(myClip);
}

cb_bau.addEventListener("change"objComboListener);
cb_fak.addEventListener("change"objComboListener);
cb_rau.addEventListener("change"objComboListener);
cb_per.addEventListener("change"objComboListener);




//Label style änder.
auswahl_cb.setStyle("fontSize"14);
auswahl_cb.setStyle("color"0xFFFFFF);
auswahl_cb.setStyle("fontWeight""bold");
auswahl_cb.setStyle("fontStyle""italic"); 
noch der button zum verlinkten 2 swf:
PHP-Code:
on (release) {
loadMovie("B-Bau6Feb.swf",0);

im zweiten SWF ist der code gleich deswegen nicht gepostet.

kann es an dem onload liegen? weiss jemand abhilfe.
danke Robin
robinnitsche 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 00:10 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele