Forum Moderators: open

Message Too Old, No Replies

Getting width/height from image loaded in loader

         

jonte

11:57 am on Jun 30, 2005 (gmt 0)

10+ Year Member



How can I in ActionScript get the width and height of the loaded image in a Loader?

I.e.

map_ld.contentPath = mappath;

then later on I want to do something like
widhtlabel_txt.text = map_ld.content.width

Seems like an easy hack, however I can't get around to fix it. Anyone?

BlobFisk

9:02 am on Jul 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Anyone have a suggestion for jonte?

Richard_N

9:51 am on Jul 6, 2005 (gmt 0)



store the images paths and sizes in an xml file and then load from that?

jonte

10:06 am on Jul 6, 2005 (gmt 0)

10+ Year Member



Thanks. I guess I have to do something like that. I was just interested in getting the width/height "on the fly" but I guess it's not possible.