should this work??
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: should this work??

  1. #1
    Senior Member SJT's Avatar
    Join Date
    Mar 2000
    London, UK
    Ok, this is a bit complex to explain, but the principle is probably quite simple, i just can't work it out.

    the xml is in the format of:
    <'main subnumber="4" mainheading="This is the main heading"'>
    <'subsection no="1" title="title 1" layout="1"'>This is subsection 1<'/subsection'>
    <'subsection no="2" title="title 2" layout="3"'>
        <'column no="1"'>first column text</column'>
        <'column no="1"'>second column text</column'>
        <'column no="1"'>third column text</column'>
     <'subsection no="3" title="title 3" layout="1"'>This is subsection 3<'/subsection'>
    (single quotes to break the html parser on this site)
    basically i've got a couple of mclips each with either a single text box, three text boxes in 3 columns or some other text box layout...what i want is to be able to tell one of those clips to play,and to load one of the <'subsection'> blocks. which clip that plays being specified by the 'layout' attribute, and which subsection the mclip gets it's text from is specified by the 'no' attribute.
    I thought i'd worked it out and put this into the mclips....
    var attNumb =;
    //get the attribute "no"
    var children =_root.content.childNodes.length;
    //get the number of subsections
    var x = 0;
    for ( attNumb in children) {
    	if ( attNumb == _root.subNumber){
    //subsections are defined by which button is clicked
    //therefore attNumb == _root.subNumber as set by a button
    Am I barking up completely the wrong tree, or just put a stupid syntax error in somewhere???

  2. #2
    Senior Member SJT's Avatar
    Join Date
    Mar 2000
    London, UK
    no, it shouldn't...sorry to waste anyone's time reading this post.

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