I'm trying to set the width and height to a percentage, but when I try to do this, the flash file doesn't show up at all.

This is what I'm entering:

<?php
print swf('sites/default/files/moving_colors.swf', array('params' => array('height' => '100%', 'width' => '100%')));
?>

I have also tried this filter:

<swf file="sites/default/files/moving_colors.swf" flashvars="width=100%&&height=100%">

I've tried using SWFObject 2 and Direct embedding.

Anybody have any ideas?

Thanks in advance!
Steve

Comments

washwithcare’s picture

i have the same problem.

hamsterbacke42’s picture

Currently I also have the problem that I can only set the width but not the height at the same time..
nothing shows up

Oscar Illada’s picture

Same problem. anyone have the solution. Thanx

soyarma’s picture

This may not directly answer your question, but it does explain how the swftools module sets width and height and in what order and preference the various settings get used.

http://drupal.org/node/348935#comment-2287790

nsputnik’s picture

I would like there to be a way to define the max width and height of the SWF or maybe a static width and height setting for all SWF embeds per node type using them in CCK.

houdelou’s picture

Found any solutions ? I'm trying to set the dimensions in percentage too.

evanmwillhite’s picture

Not sure about 1.3, but with 2.5 I got this working using your exact array(param... code above. My only hurdle was a CSS one - making sure the height/width of the divs leading up to the object were all set to 100% width/height.