[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • Last Modified:

How to set <object> tag in HTML to accomodate a resizable application

A typical <object> tag in an html page looks like:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                    width="400" height="400">

I need to get around having to specify a fixed width and height because my Flex/Flash application is resizable. When I remove the width and height attributes, my application doesn't even show.

Can anyone tell me how to use the <object> tag with a resizable object like my Flex/Flash application? Thanks.
0
elepil
Asked:
elepil
1 Solution
 
Erwin_001Commented:
It's because the <object> tag doesn't have standard wrapping markup like div's and span's that you don't see the movie. The object is still like "imploded" into a mere marker on the HTML page but has no visual properties. When adding width and height you make it div-like and then it can show it's inner content.

What mostly worked for me is giving the <object> 100% dimensions and then control it with a wrapped <div>. I'm not sure if the movie will be stretched. I think it depends on your export settings.

I tried this code once with JavaScript to resize the <div> box, but unhappily the rendering of the Flash movie wouldn't stretch with the DOM. Maybe jQuery can achieve something like that. You can keep your Flash's navigation/location in a session and refresh the <div>'s content with an AJAX request.



<style type="text/css">
    .objectContainer {
        width: 950px;
        height: 680px;
    }
    
    .flashObject {
        width: 100%;
        height: 100%; /* In Safari 4 on Mac OSX it keeps it's proportion */
    }
</style>

<div class="objectContainer">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" class="flashObject">
    </object>
</div>

Open in new window

0
 
elepilAuthor Commented:
Sorry I didn't get back to this sooner. I did not describe my issue properly. So I will close this and award you the points anyway. My new post which describes the problem better is at:

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Flex/Q_24999904.html
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now