I don't think this is an Ext bug -- it is related to manipulating the flash object in various ways (explained below).
First off, unfortunately, I don't know of a way to make this work with animated collapse. The animation uses the slideOut effect, and I traced it through to the line of code that causes the flash object to reset (in Ext.Fx.fxWrap):
Code:
wrap.dom.appendChild(this.dom);
The way slideOut works is that it creates a wrapping div (so that the element has something to slide out of), inserts it into the DOM just before the element (in this case before the panel's bwrap element) and finally makes the element (bwrap) a child of the fx wrapper. As soon as the flash object is moved, it immediately resets. You can even see it reset to zero as it starts to slide up, before it's even hidden. If there's a way around this, it's not obvious to me.
The good news is that you can make it work using non-animated collapse with a couple of changes. The flash object also has issues when you use display mode -- iframes have the same issue. If you simply add the config animCollapse:false, it still resets because Panels use display mode by default. However, this is not an Ext bug, it's the flash object itself not tolerating display mode changes. You can verify this by pulling up the HTML tab in Firebug on your test page and on the "x-panel-bwrap" node, edit the style inline. When you toggle display:none/block manually, the flash object resets. When you toggle visibility, it does not.
So the fix that works for me is setting animCollapse:false AND adjusting the body wrap element's visibility mode:
Code:
var pnl = new Ext.Panel({
title: "Flash Content",
renderTo: 'pnl1',
collapsible: true,
animCollapse: false,
width: 300,
height: 70,
html: player
});
pnl.bwrap.visibilityMode = Ext.Element.VISIBILITY;