Hi there,

I'm trying to run 1pixelout on my website but there is this odd white box that takes up so much space and is really ugly around the 1pixelout flash. Could someone help me out, maybe looking at the code - maybe I configured something incorrectly:

http://www.ggsacademy.com/node/56

Thanks!
-- Gagan

Comments

Stuart Greenfield’s picture

It looks like there is a lot of "extra" space associated with the player that is actually part of the flash area. I notice from the code there is no explicit height or width - try assigning some specific sizes and see if that helps?

Default sizes for 1 pixel out are height of 24 and width of 290.

Stuart Greenfield’s picture

Status: Active » Postponed (maintainer needs more info)

OK - I tested this locally, and if you don't have a height / width then you get lots of white space - my page ended up looking something like yours! SWF Tools should get the height and width for a player automatically by querying the swf file, so how are you generating the player?

If you can supply (or work out why SWF Tools isn't supplying) a height and width then you should get a better looking page :-)

gaganji’s picture

Status: Postponed (maintainer needs more info) » Fixed

I just added some code to the swftools.module file:

...
function swftools_swftools_embed($action = 'add_js', $methods = FALSE, $vars = FALSE, $preview = 'NA') {

  if ($action == 'add_js') {
    // No javascript stuff for this embed method to do.
    return;
  }

  $P = $vars->params; // For legibility.

  // Added If Statement to set width and height for 1pixelout swf
  if ($P['src'] == 'http://www.ggsacademy.com/modules/swftools/shared/1pixelout/player.swf') {
    $P['width'] = 290;
    $P['height'] = 24;
  }

  $width_attr = ($P['width']) ? ' width="'. $P['width'] .'"' : '';
  $height_attr = ($P['height']) ? ' height="'. $P['height'] .'"' : '';
...

Thanks for your help. It worked!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

amariotti’s picture

Status: Closed (fixed) » Needs review

I ran into this problem and think that this patch should be committed. 1pixelout is a fancy looking player that should look good out of the box. Doesn't make sense why you would have to change anything on it so that it doesn't have a white box around it. Should be easy enough to submit a patch. If I knew how to do it then I would. It might also be nice to change the src URL to point to the base site and module directory rather than an external one. Just a thought though.

Stuart Greenfield’s picture

Yes - I had missed that this issue got closed, when the suggested fix actually makes sense. The code above includes a hard coded path, but the proper fix would not use the path to determine the player - there are simpler ways to do this during the construction of the content for display.

I have a few bug fixed queued up for work, but now this one is showing as a patch I'll remember to address it!

amariotti’s picture

Great! Thanks.

ron williams’s picture

Status: Needs review » Closed (won't fix)

5.x-1.x is no longer supported, so I have marked as closed.