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;
}

________________________________________
From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S. 
[mattsp...@gmail.com]
Sent: Friday, June 11, 2010 11:01 AM
To: Flash Coders List
Subject: Re: [Flashcoders] targeting mc

Can you post more of your code? Specifically the code that creates the
intended target in the first place.

.m

On Fri, Jun 11, 2010 at 10:43 AM, Lehr, Theodore
<ted_l...@federal.dell.com>wrote:

> I think it is a matter of scope.... the mc I am trying to affect
> (this["details"+e.currentTarget.name]) is a texfield created in a function
> - so I am guessing it is not accesible outside of that function... there are
> multiple instances of these textfields... they are created in a loop like:
>
> var barDetails:new TextField();
>
> ......
>
> barDetails.name=.....;
> addChild(barDetails);
>
>
> I even tried taking the var barDetails:new TextField(); otside of the
> function, but I get the same error....
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to