A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Cannot think why this code isnt working

  1. #1
    Senior Member
    Join Date
    Jul 2007
    Posts
    243

    Cannot think why this code isnt working

    Hi, im just loading a simple one line of xml into a dynamic textbox(nested in a movieclip).
    but nothing appears there however:
    1. if i put the textbox on the stage it works
    2. i have adopted code from an already working dyunamic text box which is nested inside 2 movieclips.
    3. i have applied a trace and that gives me the right result

    so i am at a loss...

    here is my code i am using:
    PHP Code:
    var xmlLoader:URLLoader = new URLLoader(); 
    var 
    xmlData:XML = new XML(); 

    //askPage.nameA.condenseWhite = true;
    btn1.addEventListener(MouseEvent.CLICKbeginXML);

    function 
    beginXML(event:MouseEvent):void {
    xmlLoader.load(new URLRequest("askStudent.xml")); 
    xmlLoader.addEventListener(Event.COMPLETELoadXML);
    }


    function 
    LoadXML(e:Event):void 
    xmlData = new XML(e.target.data); 
    ParseBooks(xmlData); 
    //mapContainer.insideMap.library.removeEventListener(MouseEvent.CLICK, test);


    function 
    ParseBooks(askStudent:XML):void 
    var 
    Student1:XMLList askStudent.student.(@studentName == "Dave");  
    trace(Student1.name)
    askPage.nameA.htmlText Student1.name;

    thanks

  2. #2
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    askPage.nameA.htmlText = Student1.name;
    Shouldnt be
    askPage.nameA.htmlText.text = Student1.name;
    ?

  3. #3
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    no nothing happens if i add .text onto the end.
    and im using .htmlText in my other fla file

  4. #4
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    can anybody else think of any reason?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center