Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 11-07-2004, 16:30   #1 (permalink)
...
 
Registriert seit: Jun 2004
Beiträge: 115
rekursive Schleife, xml, height

Ich wollte ein Gästebuch machen, mit einem Scrollbalken, bzw. mc._y++
das funktioniert auch schön!

da ja nicht alle Gästebucheinträge gleich lang sind dachte ich mir das ich, das auslesen, und bauen der XML GB Liste wie folgt löse, aber bekomme immer beim tracen 0, 240, 240
und komischer weiße wächst die height gar nicht mehr! Sollte es aber oder?

Grüße Tobi

Wär klasse wenn einer einen Rat weiß !! Tobi

PHP-Code:
buildlayout = function (_xmlto_Y) {
    var 
theNode _xml.childNodes;
    
//loc = this;
    
con_gbdate.depth;
    if (
i<>con_gbdate.size_xml) {
        
temp = new Object();
        
temp.id theNode[i].attributes.id;
        
temp.date theNode[i].attributes.date;
        
temp.time theNode[i].attributes.time;
        
temp.nick theNode[i].attributes.nick;
        
temp.text theNode[i].attributes.text;
        
// 
        
trace(conlist_mc._height);
        
init = {_y:to_Ydata_obj:temp};
        
conlist_mc.attachMovie("gb_entry""gbentry"+con_gbdate.depth+"_mc"conlist_mc.getNextHighestDepth(), init);
        
con_gbdate.depth++;
        
height rechnung;
        
buildlayout(_xmlheight);
    }
}; 
Tobi81 ist offline   Mit Zitat antworten
Alt 11-07-2004, 16:46   #2 (permalink)
...
 
Registriert seit: Jun 2004
Beiträge: 115
Korretur:

PHP-Code:
buildlayout = function (_xmlto_Y) {
    var 
theNode _xml.childNodes;
    
// loc = this;
    
con_gbdate.depth;
    if (
i<>con_gbdate.size_xml) {
        
temp = new Object();
        
temp.id theNode[i].attributes.id;
        
temp.date theNode[i].attributes.date;
        
temp.time theNode[i].attributes.time;
        
temp.nick theNode[i].attributes.nick;
        
temp.text theNode[i].attributes.text;
        
// 
        
init = {_y:to_Ydata_obj:temp};
        
conlist_mc.attachMovie("gb_entry""gbentry"+con_gbdate.depth+"_mc"conlist_mc.getNextHighestDepth(), init);
        
con_gbdate.heightofCon height=conlist_mc._height;
        
// trace(height)
        
con_gbdate.depth++;
        
buildlayout(_xmlheight);
    }
}; 
oder vieleich so?
PHP-Code:
if (i<>con_gbdate.size_xml) {
        
temp = new Object();
        
temp.id theNode[i].attributes.id;
        
temp.date theNode[i].attributes.date;
        
temp.time theNode[i].attributes.time;
        
temp.nick theNode[i].attributes.nick;
        
temp.text theNode[i].attributes.text;
        
// 
        
init = {_y:to_Ydata_obj:temp};
        
conlist_mc.attachMovie("gb_entry""gbentry"+i+"_mc"conlist_mc.getNextHighestDepth(), init);
        
con_gbdate.depth++;
        
buildlayout(_xmlconlist_mc._height);
    } 
hab auch so probiert:
PHP-Code:
    if (i<>con_gbdate.size_xml) {
        
temp = new Object();
        
temp.id theNode[i].attributes.id;
        
temp.date theNode[i].attributes.date;
        
temp.time theNode[i].attributes.time;
        
temp.nick theNode[i].attributes.nick;
        
temp.text theNode[i].attributes.text;
        
// 
        
init = {_y:to_Ydata_obj:temp};
        
conlist_mc.attachMovie("gb_entry""gbentry"+i+"_mc"conlist_mc.getNextHighestDepth(), init);
        
trace(conlist_mc["gbentry"+i+"_mc"]._height);
        
con_gbdate.depth++;
        
conlist_mc["gbentry"+i+"_mc"].onData = function() {
            
buildlayout(_xmlconlist_mc._height);
        };
    } 
aber das funzt immer noch nicht richig!

auf gb_entry:

PHP-Code:
gbname_txt.text data_obj.nick;
gbdate_txt.text data_obj.date;
gbtime_txt.text data_obj.time;
gbtext_txt.autoSize true;
gbtext_txt.text data_obj.text

Geändert von Tobi81 (11-07-2004 um 17:12 Uhr)
Tobi81 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 06:13 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele