492 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • India
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
avenue28 says

Hi guys,

I saw a thread a couple of days back about a bug in firefox which is about the ‘onResize’ event in flash not firing when there is only one page opened in firefox and a new tab is opened due to which the size of the stage is reduced. I was looking into a solution and found it.

You need to style your ‘body’ tag with a top margin of 1px. Something like this:

html, body {
margin: 0px;
margin-top:1px;
padding: 0px;
overflow:hidden;
height:100%;
}

All the code above except for the top margin is something we generally do (it is provided by default if you use SWFObject). So add a top margin of 1px to it and voila!!!, the resizing works in firefox.

Somehow, I couldn’t find the old thread to put it there. So I opened up a new one. Hope it helps.

Cheers. :)

3868 posts
  • Author had a Free File of the Month
  • Beta Tester
  • Bought between 100 and 499 items
  • Contributed a Blog Post
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 6-7 years
+4 more
flashjunkie says

Great fix, just tested, works like a charm :)

2309 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 100 and 1 000 dollars
  • United States
theflyingtinman says

Great job. In the other thread it was observed in passing that P&K’s app which triggered the resize event correctly when the stage changed due to tab creation/removal had a one-pixel border while FT’s app did not but no one actually latched onto that as the cause of the problem.

492 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • India
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
avenue28 says

Ah! Thanks for the link. It was night for me when the thread was opened, so I couldn’t follow. I’ll go through it now.

It was pretty easy find, I came across the soultion in the first few results in Google.

2104 posts
  • Sold between 50 000 and 100 000 dollars
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
fifty_tons says

Yup, works perfectly iceonflames ). Thanks for sharing. And thanks Saafi for sharing this link :)

492 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • India
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
avenue28 says

you are welcome… :)

9 posts
  • Has been a member for 6-7 years
  • Bought between 50 and 99 items
  • Referred between 1 and 9 users
  • United States
haik74 says

works

1234 posts
  • Bought between 50 and 99 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 50 000 and 100 000 dollars
  • United States
MBMedia says

so i’m curious guys, is this all versions of firefox or just certain versions, anyone know?

2104 posts
  • Sold between 50 000 and 100 000 dollars
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
fifty_tons says

I’m using FF3 so probably the earlier versions have the same problem.

by
by
by
by
by
by