Thursday, July 29th 2010, 1:34pm UTC+2
You are not logged in.


Die Klasse gibt es in PHP5 und PHP4 im angehangenen tar File|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<?xml version="1.0" ?> <month> <week> .... <days dayinit="15" daystr="Samstag" full="Samstag Mai 2004"/> <days dayinit="16" daystr="Sonntag" full="Sonntag Mai 2004"/> </week> <week> <days dayinit="17" daystr="Montag" full="Montag Mai 2004"/> <days dayinit="18" daystr="Dienstag" full="Dienstag Mai 2004"/> <days dayinit="19" daystr="Mittwoch" full="Mittwoch Mai 2004"/> <days dayinit="20" daystr="Donnerstag" full="Donnerstag Mai 2004"/> <days dayinit="21" daystr="Freitag" full="Freitag Mai 2004"/> <days dayinit="22" daystr="Samstag" full="Samstag Mai 2004"/> <days dayinit="23" daystr="Sonntag" full="Sonntag Mai 2004"/> </week> <week> <days dayinit="24" daystr="Montag" full="Montag Mai 2004"/> <days dayinit="25" daystr="Dienstag" full="Dienstag Mai 2004"/> <days dayinit="26" daystr="Mittwoch" full="Mittwoch Mai 2004"/> <days dayinit="27" daystr="Donnerstag" full="Donnerstag Mai 2004"/> <days dayinit="28" daystr="Freitag" full="Freitag Mai 2004"/>..... </month> |

|
|
ActionScript-Quelltext |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
/**
* Die Variable _global.SRCURL sitz auf Bild 1
* @see MovieClip "quanta"
* @set MovieClips (box_[1-x])
*/
this.xmlloader = function() {
if (_global.SRCURL != null && _global.SRCURL.indexOf("http://") != -1) {
_root.Monat;
_root.xml_obj = new XML();
_root.xml_obj.ignoreWhite = true;
_root.xml_obj.request = _global.SendRequest;
_root.xml_obj.load(_global.SRCURL, _root.xml_obj);
_root.xml_obj.onLoad = function(insert) {
if (arguments != true) {
this.onLoad = {};
}
// Nehme Monatzeile
_root.Monat = _root.xml_obj.childNodes[0].firstChild.attributes.monat;
// Erstelle Wochentage
var tagnamen = _root.xml_obj.firstChild.childNodes[1].childNodes;
for (var i = 0; i<tagnamen.length; i++) {
tagnamen[i].attributes.name;
}
// Durchlaufe WochenTage
var weekdays = _root.xml_obj.firstChild.childNodes[2].childNodes;
var sum = int(0);
var xw = int(10);
var yh = int(10);
var c = int(28);
//
for (var i = 0; i<weekdays.length; i++) {
var woche = weekdays[i].childNodes;
for (var j = 0; j<woche.length; j++) {
// MovieCLip Ausgabe
_root.kalender.attachMovie("quanta", "box_"+sum, 120+sum);
_root.kalender["box_"+sum]._x = xw;
_root.kalender["box_"+sum]._y = yh;
// Attributes init (Tages Zahl)
if (woche[j].attributes.init != null) {
if (woche[j].attributes.init != 0) {
_root.kalender["box_"+sum].ziffer_txt.text = woche[j].attributes.init;
_root.kalender["box_"+sum].ziffer_txt.tabIndex = woche[j].attributes.init;
}
}
// Tag hervorheben
if (woche[j].attributes.aktiv != null) {
if (woche[j].attributes.aktiv != 0) {
_root.kalender["box_"+sum].ziffer_txt.textColor = "0xFF0099";
} else {
_root.kalender["box_"+sum].ziffer_txt.textColor = "0x00000";
}
}
// Attributes name (Name des Tages)
if (woche[j].attributes.name != null) {
woche[j].attributes.name;
}
// Attributes full (volles Datum)
if (woche[j].attributes.full != null) {
woche[j].attributes.full;
}
// Counter für Element Anzahl
_root.kalender["box_"+sum].ziffer_txt.autoSize = "center";
_root.kalender["box_"+sum].ziffer_txt.condenseWhite = true;
_root.kalender["box_"+sum].ziffer_txt.embedFonts = false;
_root.kalender["box_"+sum].ziffer_txt.backgroundColor = "0x000000";
//
sum++;
// Zeilen Umbruch
xw = (xw != null) ? xw+20 : _root.kalender._x;
if ((sum%7) == (null || 0)) {
yh = (yh+20);
xw = 10;
}
}
}
};
} else {
trace("Das ist keine reguläre URL angabe\n XML.onLoad benötigt dies damit das PHP-Script vom Server geparst werden kann!");
}
};
_root.onLoad = xmlloader();
|
|
|
ActionScript-Quelltext |
1 |
