Launching an autoresizing pop up from flash

[font=verdana, arial, helvetica][size=2]I have some images i want to launch pop ups from Flash. Because there are a lot of them it would be a pain to go through each button setting the pop up dimensions. Is there a way to have the pop up launch, note its contents and resize accordingly? Would this involve some JavaScript?
thanks,
j[/size][/font]