You're going to want to group the elements you want to be responsive and then apply flexibly properties to them. This post explains a common configuration that:
I don't think you need the detect display function -- Hype will determine your browser's width and adjust the size of your Hype embed based on that information.