A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Can't put values into array, ugh!

  1. #1
    Junior Member
    Join Date
    Nov 2004
    Posts
    7

    Can't put values into array, ugh!

    Driving me nuts!

    I am loading images and am getting their heights via trace but can't put them into an array to save my life. HELP!

    Code:
    var imageResArray:Array = new Array();//used to store image height
    
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, ImageLoaded);
    ldr.load(new URLRequest(menuArray[c].iPath.toString()));
    
    function ImageLoaded(e:Event):Array
    {
        var imageLoader:Loader = Loader(e.target.loader);
        var bm:Bitmap = Bitmap(imageLoader.content);
        trace(bm.height); // This works just fine
        imageResArray.push(bm.height); // No love
    }

  2. #2
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    Odd, tried out the provided code and it works for me. Have you tried putting a trace statement after the Array.push statement? If so, what's the output?
    Wile E. Coyote - "Clear as mud?"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center