views:

533

answers:

2

I have a flash within a holder div (flash container). I use swfobject to insert the flash object (if it makes any difference).

I want to resize that holder div to make it smaller in width, when I achieve the "second level" in my "flash application". (with jQuery .animate() function).

What "flash application" mean: I have a human body on wich I can click in different body areas. That is the first action - and the effect is to zoom onto that specific area of the body.

Then I can click again on a more specific zone into that area - and the effect consists in fetching some stuff via ajax. (it's some medical stuff, diseases etc.) - that's the "second level" in my "flash application".

Then I can click on that stuff fetched via ajax - that's when I resize the flash holder.

The problem is that, because of this resizing, my flash reloads and comes back to it's original state, without that zoom level. This reload appears in the "second level", and not when I click on the stuff fetched via ajax and the flash holder resizes. But that's the cause of the reload, because without this resizing, it's all ok.

The problem is just in Firefox, I tested it in IE6,7,8, Opera 10, Safari latest and Chrome and there's nothing wrong there, the flash does not realod.

Hope you understand what I'm saying here :) if not I cand send you a private message with the URL to see what I mean (I can't make it public)

Thank you,

Adrian

A: 

I've tried to animate a div in the way you described, and I'm getting the same behaviour. Instead of trying to fix this problem, I suggest working around it.
f.e., leave the original div alone, and let another div that is positioned on top of the flash animate.

note: remember to use the wmode:"transparent" when embedding your SWF, so you can correctly use z-index to position anything above the SWF.

Jasper De Bruijn
+1  A: 

The issue you're experiencing is noted in the following jQuery ticket #4872. A simple fix for it is to set the style of the animated wrapper to #wrapper { overflow: hidden !important; }. That will stop your flash object from reloading when being animated.

Rudisimo