How can I create a flash with auto-resize backgound?

The flash background will depends on content image size.

any idea with that?