Lehr, Theodore wrote:
Basically:

function parseSumXML(e:Event):void
{

    //looping through the xml
    for (var n:int=0; n<totalChildren; n++) {
          obar.graphics.beginFill..... (creating square);
          obar.name = "Assigned"+n;
          obar.addEventListener(MouseEvent.ROLL_OVER,showDetails);

          var barDetails:TextField...... creating textfield;
          barDetails.name="detailsAssigned"+n;
          barDetails.visible=false;
    }
}

function showDetails(e:Event):void
{
            this["details"+e.currentTarget.name].visible=true;
}

I got it!

You are assuming that the named children results in corresponding properties on the container. This is not the case. That is only for timeline instances. Code instantiated objects does not get this. Use getChildByName instead.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to