Please refer to below link hope it will help you to achive that you are looking for.
I think this is similar to parameter control of background image. I wish to change the background based on calculated field, not any user control. Please correct me if I am wrong. Thanks for your suggestion though.