Try it in the second trace you have; it's not loaded When you're first tracing

Sent from my iPhone

On Jul 1, 2010, at 6:32 AM, Pankaj Singh <singh.pankaj.iitkg...@gmail.com> 
wrote:

> even after using INIT i m getting 0 width because event listener function is
> never called (trace statement is not working)
> 
> for (var i:int=0; i < lettersCount; i++)
>    {
>        imageLoader[i].load (new URLRequest(
> xmlLettersList[i].attribute("img")));
>        imageLoader[i].width = imageLoader[i].addEventListener(Event.INIT,
> imgInitialised);
>        trace("width = " + imageLoader[i].width);
>        function imgInitialised (e:Event):Number
>        {
>            var bm:Bitmap = Bitmap(e.target.content);
>            trace("inside function image Loaded");
>            return bm.width;
>        }
> _______________________________________________
> 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