Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- header_btn.header_txt.text = "Afspraak maken";
- var entrycount = 0;
- var doctorXML:XML = new XML();
- doctorXML.ignoreWhite = true;
- var doctoren:Array = new Array();
- doctorXML.onLoad = function(success) {
- //Adam - added this just as a test.
- trace("hit");
- entrycount = 50;
- for(var i:Number=0; i < this.firstChild.childNodes.length; i++){
- var doctor:Object = new Object();
- doctor.voornaam = this.firstChild.childNodes[i].childNodes[0].firstChild;
- doctor.achternaam = this.firstChild.childNodes[i].childNodes[1].firstChild;
- doctor.specialisatie = this.firstChild.childNodes[i].childNodes[2].firstChild;
- doctor.locatie = this.firstChild.childNodes[i].childNodes[3].firstChild;
- doctor.id = this.firstChild.childNodes[i].childNodes[4].firstChild;
- doctoren.push(doctor);
- entrycount++;
- trace("GOT DATA"+doctor.voornaam); //TEST TRACE
- }
- if(entrycount == 0)
- {
- trace("No entries");
- }
- else
- {
- for(var j:Number=0; j < entrycount; j++){
- duplicateMovieClip("doctorbutton", "doctorbutton"+j, j);
- _root["doctorbutton"+j]._x=6;
- _root["doctorbutton"+j]._y=70 + j * 80;
- _root["doctorbutton"+j].doctortext_txt.naam_btn.text_txt.text=doctor.voornaam+" "+doctor.achternaam;
- _root["doctorbutton"+j].doctortext_txt.specialisatie_btn.text_txt.text=doctor.specialisatie;
- _root["doctorbutton"+j].doctortext_txt.locatie_btn.text_txt.text=doctor.locatie;
- doctor.id=doctor.id;
- }
- }
- }
- doctorXML.load("doctoren.xml");
- stop();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement