Delay stage creation


I would like to set the stage size to the size of a random jpeg after it successfully loaded. So I don’t know the dimenstions beforehand. It there a way to do that without using javascript. I know there is a solution using javascript, but I don’t want to use that. I know I can set the stage size by using [SWF(width = 800, height = 600)]. But that only works before you do anything else. Not after loading the jpeg. Do you know a solution?

Thanks for your time and effort,