-
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
-
Make sure the images are loaded before you get the height of the images.
-
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
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|