vendredi 26 février 2016

typeerror : 2007 actionscript3

I am running the following piece of code:

function letterclick(e:MouseEvent)
{
    myxmllist = new XMLList(myxml.word.(@clas==e.target.name).@wordname);
    for each (var word:XML in myxmllist)
    {
        var btn:MovieClip = createbtn(myxmllist[i]);
        btn.x = 100;
        btn.y = 130 + n;
        addChild(btn);
        n +=  50;
        btn.addEventListener(MouseEvent.CLICK,wordclick);
        i++;
    }
    var a:String = e.target.name
    if (a=="xx") a="x"
    else if (a=="yy") a="y"
    else if (a=="zz") a="z" 
    activeletter.text = a.toUpperCase()
}

but i have TypeError: Error #2007: Parameter text must be non-null. Can anyone tell me what is going on and how to remove this error.

Aucun commentaire:

Enregistrer un commentaire