Results 1 to 2 of 2

Thread: Action Script on SWF

  1. #1
    Join Date
    Feb 2008
    Posts
    4

    Action Script on SWF

    I got this and get result in single-line.
    I want it one by one like the following:

    1234

    1234

    1234

    1234




    Here is the code I am using:

    function menu()
    {
    pathID = _xml.idMap.menu;
    total = pathID.childNodes.length;
    _root.m_arr = [];
    while (i < total)
    {
    mcx = attachMovie("MenuM", "btn" + i, i);
    mcx.textM._text = "<font color=\'#990000\'></font>" + pathID.childNodes[i].attributes.btnName;
    mcx._i = i;
    set("btn" + i + ".p", pathID.childNodes[i].attributes.p);
    set("btn" + i + "._textH", pathID.childNodes[i].attributes.btnName);
    mcx.textM.textT.autoSize = true;
    j = i - 1;
    this["btn" + i]._x = Math.floor(this["btn" + j]._x + (this["btn" + j]._width + 10));
    mcx.mbg._width = mcx.textM._width;
    mcx.btn._width = mcx.mbg._width;
    ++i;
    } // end while
    } // End of the function
    _xml = new XML();
    _xml.load("dat/xml/xmlx.xml");
    _xml.ignoreWhite = 1;
    _xml.onLoad = function (ok)
    {
    if (ok)
    {
    menu();
    setStage();
    _root.p = "15";
    _root.Menu_xml.btn0.gotoAndStop(10);
    _root.Menu_xml.btn0.mbg.gotoAndStop(10);
    _root.Menu_xml.btn0.btn.enabled = false;
    _root.m_numb = "0";
    }
    else
    {
    trace ("XML not loaded");
    } // end else if
    };
    i = 0;
    Last edited by ahlimosa; 17 Feb 2008 at 10:56 PM.

  2. #2
    Join Date
    Feb 2008
    Posts
    4
    can anyone help???

Posting Permissions

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