views:

353

answers:

2

I am trying to load the dynamic SWF file which has 100% width and height ,generatd by my flex 3 in a div. using Jquery load() function. The div wherein i am trying to load is visible for sometime but after that my SWF comes out of div and takes whole viewport area to display the SWF. I have tried to provide fixed height and width to div but no luck. I want to load that SWF file in that particular div only. Could anybody please help me with this.

A: 

Struture is very simple

$(#divID).load('sample.swf');

> <div id="divID"
> style="height:400px;height:400px;">
> &nbsp; </div>

where sample.swf is generating dynamically and has 100% height and width.

shruti
Please add this to the question and delete this "answer"
Amarghosh
A: 

I would be very surprised if this worked at all. AFAIK, a flash/flex object needs to be inserted in the DOM in a specific way (using <embed> or <object>).

A very nice (and free) javascript component that does everything you need is flashembed:

http://flowplayer.org/tools/flashembed.html

Philippe Leybaert