SWFObject Incorrect Size

I’m using version 1.4 of SWFObject and it seems to be incorrectly sizing certain Flash movies. The JavaScript I’m writing sets the size to 315×180, but the markup it outputs in both Firefox and IE has the size explicitly set to 180×72.

Turns out this was caused by multiple SWFObjects on the same page. The code that wrote them out wasn’t built for multiple objects, so it always created a container div with the same ID, then wrote the object into that div. So the movie wasn’t getting shrunk – it was getting overwritten by a smaller similar-looking one.

Fixed by changing the code to increment a counter of Flash objects so that separate IDs are used each time.

Part of the point of a buglog, I guess, is that you get to keep track of the embarassing ones too =]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: