criptopus wrote:
> If i have an event Listener of the following type on an array element how do
> I determine the element from within the event so as to set one of the
> elements properties.
>
> e.g.
>
> imgArray[imgIdx].addEventListener(Event.COMPLETE, adjustImage);
>
> private function adjustImage(e:Event):void
> {
>
> var picWidth:int=(e.currentTarget as Image).width;
> imgArray[???].height=picWidth * 2;
>
> }
>
> - Stephen
>
>
currentTarget refers to the image object, not the array.
imgArray is an Array reference
imgArray[imgIdx] is an Object reference.
Effectively you are trying to write "picWidth.height=picWidth * 2;"
Paul