Getting an image's width and height

Is it possible to get an image’s width and height of an image from a certain directory?
I want to the following… have a photo gallery that dynamically loads photos from a directory and centers them on the flash movie… then, when you click on the photo a html pop-up appears with the full-size photo, the pop-up window being the same size as the photo… if i can do these some otehr way, without getting the size of the images, please tell me…
thanks in advance

would anyone please help me?