A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Help me with the correct syntax please.

Threaded View

  1. #1
    Senior Member flipsideguy's Avatar
    Join Date
    Dec 2000
    Location
    Sweden
    Posts
    834

    Help me with the correct syntax please.

    Hi,

    I can't get this right. What am I doing wrong? Any help is much appreciated!

    Thanks,

    /Flip

    XML
    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <port>
     <set>
      <image piece="imgA1.jpg" />
      <image piece="imgA2.jpg" />
     </set>
    </port>
    <port>
     <set>
      <image piece="imgB1.jpg" />
      <image piece="imgB2.jpg" />
     </set>
    </port>
    AS
    PHP Code:
    xmlParse = function (xmlObj) {
        
    aNode xmlObj.childNodes;
        
    len1 aNode.length;
        for (var 
    0!= len1n++) {
            
    piece[n] = [];
            
    len2 aNode[n].firstChild.childNodes.length;
            for (var 
    0!= len2j++) {
                
    piece[n][j] = aNode[n].firstChild.childNodes[j].attributes.piece;
            }
        }
        
    trace(piece[1][1]); // traces undefined

    Last edited by flipsideguy; 07-01-2008 at 04:43 PM.
    Flipsideguy

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