Resize swf dynamically in AS3

Is there any way to resize the .swf dynamically in AS3? I’m creating an mp3 player with a collapsible playlist that’s embedded in an HTML page. The playlist might exceed the height I set it at…

One solution I thought of is just setting the array of songs in the html via swfobject then just calculating the height based on that.