[SWFObject] Resizing swfObjects without reloading

Geoff Stearns geoff at deconcept.com
Tue Jun 6 05:35:36 PDT 2006


this would rewrite the flash movie to the page, which you probably  
don't want.

you could try setting the height of the object/embed tag using  
javascript instead.

just use the id you specify when you write it to the page - the id is  
the second parameter in the 'new SWFObject' line.

so it would be:

document.getElementById('swfid').style.height = 500;

(or something close to that)


On Jun 5, 2006, at 11:22 PM, Hay, Owen wrote:

> Hey all,
>
> I've been trying to resize a swfObject like from a getURL  
> javascript call inside my flash application like so:
>
>
> function newHeight(h)
> {
>     so.setAttribute("height", h);
>     so.write("flashContent");
> }
> //-->
>
>
>         <div id="flashcontent">
>                 <strong>You need to upgrade your Flash Player</strong>
>                 This is replaced by the Flash content.
>                 Place your alternate content here and users without  
> the Flash plugin or with
>                 Javascript turned off will see this. Content here  
> allows you to leave out <code>noscript</code>
>                 tags. Include a link to <a href="swfobject.html? 
> detectflash=false">bypass the detection</a> if you wish.
>
>         </div>
>
>         <script type="text/javascript">
>                 // <![CDATA[
>
>                 var so = new SWFObject("myflash.swf", "myflash",  
> "300", "300", "8", "#FF6600");
>                 so.write("flashcontent");
>
>
>
>                 // ]]>
>         </script>
>
>
> The problem is that I would like to be able to resize the object  
> without having to reload the swf.  I looked at the .js source, and  
> it doesn't look like any methods were designed for this purpose.   
> Does anyone know of an effective way of resizing the flash object  
> without this reload?
>
> Thanks
>
> ~O~
> owenhay at amazon.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20060606/bfc03541/attachment-0005.htm>


More information about the Swfobject mailing list