XML / Flash help, please.

Out of context: Reply #2

  • Started
  • Last post
  • 15 Responses
  • Andrew_D0

    Hi, for some reason I'm not able to bold text in flash when I add < strong >tags to it in the XML.
    Here's what the XML looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <itemContainer>
    <item title = "Tips & tricks" path = "images/features/homescreen1.jpg">
    <teaser>Blurb about personalizing your phone and using all the awesome features...</teaser>
    <detail>
    <itemDetail><![CDATA[Create a device that suits your style by using the personalization features!]]></itemDetail>
    <itemDetail><![CDATA[Put applications at your fingertips. Select Go to > Options > Select options and choose the applications you want in the menu.]]></itemDetail>
    </detail>
    </item>
    </itemContainer>
    and here's the bit of action script calling it into the flash file:
    Object.Main = this;
    onLoad.moveButtons(0);
    function galleryChoice(q) {
    tArray = new Array();
    titleArray = new Array();
    detailItems = new Array();
    detailArray= new Array();
    my_xml = new XML();
    for (var j = 0; j<curLength; j++) {
    this.th_nav["thmb"+j].removeMovi...
    }
    my_xml.ignoreWhite = true;
    my_xml.onLoad = function(loaded) {
    if (loaded) {
    gallery = this.childNodes[q];
    curLength = gallery.childNodes.length;
    trace(curLength)
    _root.totalItemLength = curLength
    _root.bigPanel = 0
    for (var i = 0; i<gallery.childNodes.length; i++) {
    tArray.push(gallery);
    titleArray.push(gallery.childNod...
    }
    }
    delay = setInterval(makeButtons, 50);
    };
    my_xml.load("xml/XMLtext.xml");
    }
    function makeButtons() {
    tnNr = 0;
    clearInterval(delay);
    for (var i = 0; i<tArray.length; i++) {
    _root.panelHeight = 0
    var thb = bt_p.attachMovie("itemBox_mov", "thmb"+i,i, {_y:(i*29)})
    thb.featureText.text = titleArray[i];
    detailItems = gallery.childNodes[i].firstChild...
    trace(detailItems)
    for (var j = 0; j<detailItems.length; j++) {
    detailArray = detailItems
    var detailBox_MC = thb.contentBox.attachMovie("deta... "detailBox"+j,j, {_y:_root.panelHeight})
    detailBox_MC.featureDetailText.h... = detailArray[j]
    detailBox_MC.featureDetailText.s...
    detailBox_MC.featureDetailText.a... ="center"
    _root.panelHeight = _root.panelHeight + detailBox_MC.featureDetailText... + 5
    trace("DETAIL"+j+": "+detailArray[j])
    trace("this: "+detailBox_MC.featureDetailText...
    }
    _root.bigPanel = 50 + _root.panelHeight
    thb.featureNumHigh.text = _root.bigPanel
    _root.distanceMove = 183
    _root.buttonBG_height = 183
    _root.thisSelected = 0
    moveButtons(0)
    }
    loadButtons();
    }

    ^hopefully this works

View thread