Hi,

    Oops, missed one - try calling load() after you added the listener...

    Glen

On 01/07/2010 14:32, Pankaj Singh 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
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to