A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Problems with ._height with dynamicly loaded images

  1. #1
    "way too many questions"
    Join Date
    Feb 2001
    Posts
    312

    Problems with ._height with dynamicly loaded images

    Hi guys/gals!

    I am looking for a way to get the height of an image. Normally I would use this._height. But the problem is that I load my iamges from an xml file. this._height now gives Undefined so the rest of my actionscript is worthless.

    Can anybody help me here? Looks easy...the height of an image...But i can't get it right

    it's pretty urgent...needs to be fixed today!

    THANX!
    \joris/
    Please check my site here or help me with ideas

    Celeron 1GigaHZ
    32MB tnt2 videocard
    256 SDRAM

  2. #2
    Senior Member
    Join Date
    Feb 2004
    Location
    Amsterdam
    Posts
    209
    Make sure the images are loaded before you get the height of the images.

  3. #3
    "way too many questions"
    Join Date
    Feb 2001
    Posts
    312
    Originally posted by albert105
    Make sure the images are loaded before you get the height of the images.
    and how can this be done??
    \joris/
    Please check my site here or help me with ideas

    Celeron 1GigaHZ
    32MB tnt2 videocard
    256 SDRAM

  4. #4
    "way too many questions"
    Join Date
    Feb 2001
    Posts
    312
    We worked something out: looks like this:



    mag_bewegen = false;
    image_mcl.unloadClip(picture);
    var image_mcl:MovieClipLoader = new MovieClipLoader();
    var mclListener:Object = new Object();
    mclListener.onLoadInit = function(picture:MovieClip) {
    trace(picture._name+" = "+picture._width+" X "+picture._height+" pixels");
    picture._y = 135;
    hoogteplaatje = picture._height;
    startplaatje = picture._y;
    eindeplaatje = (picture._y-hoogteplaatje)+140;//130 is de hoogte van de mask
    mag_bewegen = true;
    \joris/
    Please check my site here or help me with ideas

    Celeron 1GigaHZ
    32MB tnt2 videocard
    256 SDRAM

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