0 Replies Latest reply on Feb 3, 2009 8:24 AM by as3132

    Connecting a CSS doc to an XML file, in a dynamic text field in Flash

    as3132 Level 1
      Hi all,

      I am trying to connect a CSS file such that it applies it self to the content of an XML file, viewed inside a dynamic text field. So far I have managed to gather the code that "calls" the contents of the XML file and also the code that calls the CSS file. However, when I test the flash movie I get "undefined" instead of the actual copy.

      Attached then is the the AS code, XML file, and CSS file. I hope you could help me connect everything together.

      And of course, THANKS!!


      Scrolling Text XML by Digital Science | www.digitalscience.za.org
      /////////////Load XML Data/////////////
      function loadXML(loaded) {
      if (loaded) {
      xmlNode = this.firstChild;
      header = [];
      txt = [];
      total = xmlNode.childNodes.length;
      for (i=0; i<total; i++) {
      header = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
      txt = xmlNode.childNodes.childNodes[1].firstChild.nodeValue;
      } else {
      errorMsg.text = "Error loading XML";
      xmlData = new XML();
      xmlData.ignoreWhite = true;
      xmlData.onLoad = loadXML;
      import TextField.StyleSheet;
      var ss:StyleSheet = new StyleSheet();
      ss.onLoad = function() {
      txt_mc.styleSheet=this; // where yourTF is your textfield
      ss.load("jokes.css"); // where yourSS.css is your css file.



      <?xml version="1.0"?>
      <?xml-stylesheet type="text/css" href="jokes.css"?>

      <ONE>Tirza Sapir</ONE>
      <JOKE>Founder and choreographer of the RikudNetto dance group, teacher and lecturer, researcher, documenter and choreographer within the framework of Eshkol-Wachman Movement Notation. She was Head of the School of the Arts of Dance at the Seminar Hakibbutzim College of Education, 2000–2007, where she established the Dance Theatre and the Practicing Teachers courses, and specialized training in Teaching and Treatment of Learning Disabilities by means of Eshkol-Wachman Movement Notation. She has written three books containing the movement scores of dance suites: Birds, Landscapes, and Hanukka Notebooks. Member of the Movement Notation Society, 1968–2008. Student and colleague of the late Professor Noa Eshkol who was the co-founder and inventor of Eshkol-Wachman Movement Notation.</JOKE>

      <ONE>Sharon Reshef-Armony</ONE>
      <JOKE>Head of the School for the Arts of dance at the Kibbutzim College of Education in Tel Aviv. Teaches EWMN, dance-theatre and composition. Choreographer of theatre plays and film. Selected works: Hunger (Tmuna Theatre 2003-09), Film - Live (Haifa Theatre 2007-08), Yakish &amp; Pupche (Gesher Theatre 2007-09), Children of a lesser God (Beer Sheva Theatre 2008-09). M.Ed (1997) from Lesley College MA in Creative Arts in Learning. Doctoral student at ResCen, Middlesex University/ London.
      Dancing in Rikudnetto group since 1990.</JOKE>

      <ONE>Tally Ronen</ONE>
      <JOKE>M.Ed. at Lesley University in Integrating Arts in Learning.

      Educational instructor at Kibbutzim College of Education and teaching dance in schools and at Clore Center, Upper Galilee. Dance choreographer for children.
      Dancing in Rikudnetto group since 1991.</JOKE>

      <ONE>Nira Al-Dor, Ph.D</ONE>
      <JOKE>20 years of Teaching EWMN at the School of the Dance Arts in Kibbuzim College of Education and at the School of Arts in Tel Aviv. Her study was focused on the impact of learning EWMN on the development of coordination.
      Dancing in Rikudnetto group since 1986.</JOKE>

      <ONE>Henner Drewes</ONE>
      <JOKE>Lectures at the Kibbutzim College of Education in Tel Aviv on dance and notation related technology. In 2008 he started working as a research assistant at Salzburg University in the project Visualizing Dance Archives.

      He was awarded the Tanzwissenschaftwpreis NRW, Germany 2006 for his research on 3D representation of movement and notation.

      Ph.D. (2002) at the University of Leipzig. He is the author of the software EW Notator, a 'word-processor' for creating EWMN scores.</JOKE>

      <ONE>Shlomit Ofer</ONE>
      <JOKE>M.A. at Haifa University at the Faculty of Education with distinction, and currently doctoral student there.

      Educational instructor and teacher of EWMN at Kibbutzim College of Education. Staging performances of dance theatre in the community.
      Dancing in Rikudnetto group since 1993.</JOKE>

      <ONE>Lilach Shalit</ONE>
      <JOKE>M.A. in Expressive Therapies with specialization in dance-movement therapy at Lesley University.

      Educational instructor and teacher of EWMN in the course for Dance-Theatre at Kibbutzim College of Education. Also teaching EWMN in the School for Advanced Studies of the college, course for Learning Disabilities, and at Orot College.

      Dance-movement therapist and team coordinator at 'Tom' school for learning disabilities and owner of a private clinic for dance-movement therapy.
      Dancing in Rikudnetto group since 1998.</JOKE>

      <ONE>Michal Manor-Amir</ONE>
      <JOKE>M.A. at the University of Leeds (Bretton Hall College and Israel Extention) in Arts Education specialization in Dance. Doctoral student at the Hebrew University of Jerusalem, in the Faculty of Humanities, the School of Education.

      Teaching movement in the Kibbutzim College of Education within preparatory courses of Dance, Dance-Theatre and within the Preschool course.
      A corrective teacher through movement and EWMN in elementary and high schools, and a national teacher-instructor at the dance supervisor's office in the Israeli ministry of education.
      Dancing in Rikudnetto group since 1998.</JOKE>

      <ONE>Amit Chesny-Bahari</ONE>
      <JOKE>B.Ed. at Kibbutzim College of Education.

      Teaching movement and dance to preschool and high school children.
      Dancing in Rikudnetto group since 2004.</JOKE>

      <ONE>Orly Yaakov</ONE>
      <JOKE>B.Ed. at Kibbutzim College of Education, and graduating from the special education faculty.

      Teaching EWMN and creative movement at elementary schools as well as special education school for children ages 6-21 with medium to deep retardation. Also teaching creative movement and preparation for ballet to preschool children.
      Dancing in Rikudnetto group since 2006.</JOKE>


      COLOR: #333333;
      DISPLAY: block;
      FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
      WHITE-SPACE: normal;
      font-size: 11px;
      MARGIN-BOTTOM: 15px;
      COLOR: #990000;
      DISPLAY: block;
      FONT-SIZE: 11pt;
      FONT-WEIGHT: bold;
      MARGIN-BOTTOM: 0px
      COLOR: #00CCFF;
      DISPLAY: block;
      LINE-HEIGHT: normal;
      MARGIN-BOTTOM: 10px;
      TEXT-ALIGN: left;
      font-size: 11px;
      text-decoration: underline;
      font-weight: bold;
      COLOR: #00CCFF;
      DISPLAY: block;
      LINE-HEIGHT: normal;
      TEXT-ALIGN: left;
      font-size: 14px;
      font-weight: bold;
      white-space: normal;
      COLOR: red;
      DISPLAY: block;
      FONT-FAMILY: Arial;
      FONT-SIZE: larger;
      FONT-VARIANT: normal
      COLOR: black;
      DISPLAY: block;
      FONT-FAMILY: 'Arial Black';
      FONT-SIZE: 14pt
      FONT-FAMILY: Arial;
      FONT-SIZE: 8pt;
      FONT-VARIANT: small-caps;
      TEXT-TRANSFORM: uppercase