Did you get a solution for this? I'm having exactly the same problem! Been tearing my hair out - I can't believe there is no simple solution to this. I don't know what dimensions each SWF will be, and I don't have any control over the Actionscript code. I have a container div and I'm adding the SWF to this using SWFObject 2.0. If I use '100%' for the width and height properties, the SWF doesn't display at all, as its containing div has no width or height set in the CSS.
WHY CAN'T FLASH HANDLE THIS??? I don't want a re-sizable SWF, I just want my containing HTML element to expand to the width and height of each SWF as it was when it was published! It seems that you can't dynamically add a SWF to an HTML page without giving it explicit dimensions, and there is no simple way to find out what they should be beforehand. On Aug 29, 11:18 pm, danyalejandro <[email protected]> wrote: > Hi > > I made an SWF that loads data from a database and dispays the results > as a vertical list; therefore, the height of the swf varies depending > on the stored data. > > Whitout using SWFObject, I have no problems embedding the SWF. It's > height varies depending on how much content it's displaying. This is > my desired behaviour. > > When I try to dynamically insert said SWF in my pages with swfobject, > I can only see it if I specify a fixed height. If I try using > width="100%", the swf dissapears. > > How can I tell SWFObject to use the swf's original height? this is my > relevant code (all of it is inside the <body>): > > <script type="text/javascript"> > var flashvars = {}; > var params = {}; > params.play = "true"; > params.loop = "false"; > params.quality = "high"; > params.wmode = "transparent"; > params.allowscriptaccess = "sameDomain"; > var attributes = {}; > attributes.id = "MapaEstrategico"; > attributes.name = "MapaEstrategico"; > attributes.align = "middle"; > swfobject.embedSWF("MapaEstrategico.swf", "mEstrategico", "768", > "100%", "9.0.28", "expressInstall.swf", flashvars, params, > attributes); > </script> > > (...) > > <div id="mEstrategico" style="width: 764px; margin: 1px auto;" > align="center"></div> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/swfobject?hl=en -~----------~----~----~----~------~----~------~--~---
