How to get the total frames in a movie clip

im loading random movieclips from an external folder into an emptymc,
i need a way to get flash to tell me the number of frames in the random clip that has been loaded.

this is what i’m trying to use now to give me a random #, within the # of frames loaded

var rNum = Math.round(Math.random(emptymc1,_totalframes))

the clips im using have 90-100 frames, but the number im getting is either 1 or 0

does anyone have any idea what’s wrong?

var rNum = Math.ceil(Math.random() * emptymc1._totalframes);