Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  
    i have a js function wich should resize a swf:

    function resize (newH) {
    window.document.imagin.height = newH;
    }

    if i embed the swf with the old swfobject 1, i can resize it any time by calling his id.height. i just tried this, never used before with swfobject.

    var so = new SWFObject("imagin.swf?<?php echo rand(0,5000); ?>", "imagin", "100", "100", "8", "#f9f9f9");


    anyway, i saw the update and i updated myself to swfobject 2. the code now looks like:

    <script type="text/javascript">
    function resize (newH) {
    window.document.imagin.height = newH;
    }
    var flashvars = { settings_xml: "settings.xml", path: "poze" };
    var params = { allowfullscreen: "true", allownetworking: "all", bgcolor: "#3F3F3F" };
    var attributes = { id: "imagin", name: "imagin" };

    swfobject.embedSWF("imagin.swf?<?php echo rand(0,5000); ?>", "imagin_instance_1", "483", "400", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

    resize(800);
    </script>

    but the resize is not working anymore, the id, the name, they are all named "imagin"
    any ideeas?
    • CommentAuthorphilip
    • CommentTimeApr 4th 2008
     
    • CommentAuthorAran
    • CommentTimeApr 4th 2008
     
    You can also have a look at some of the prebuilt js libraries for resizing:

    Using Jvascript Tweener (which is pretty cool):
    http://blog.hydrotik.com/2007/09/27/as3-resizing-swf-swfobject-javascript-tweener/

    http://www.dncompute.com/blog/2006/03/20/javascript-flash-resize.html

    swffit:
    http://swffit.millermedeiros.com/
  2.  
    hmm, i was looking at swffit, but didn't know it's so powerful.
    it's hand in hand with swfobject and works perfectly.
    the others are not, somehow the id of the flash is not available from where i call it.

    thank you.
  3.  
    one thing, if you want to use it into a block of text you have to modify from 'absolute' to 'relative', otherwise the swf will stay on top of the text.

    in fact, i removed almost entire code because analyzes the window size and i don't want this:

    gEBI(target).style.position = 'relative';
    //sets width
    gEBI(target).style.width = max_w+'px';
    //sets height
    gEBI(target).style.height = max_h+'px';