JQuery facebox + flash using swfobject.js

Technical, development Add comments

Busy like hell these days with a inhouse project for my firm.

working on HTML / CSS as well as graphing / charting for the project.

the toolset i am using

  1. Open Flash Chart
  2. FaceBox
  3. Jquery
  4. Jsp
  5. MySql

A simple tip i am writing as i was experimenting with Facebox, Open Flash Chart, and a large array of javascript in one page.

and i found one error.

while the default samples provided at open flash chart website work fatastically when working alone but have a piculiar to flash problem while working with jquery specially facebox.

when a facebox method is called it goes in the backround while the flash remains in the foreground. no matter what z-index game you try but flash always remain on top of facebox.

A bit of googling yielded http://joelg.info/problem-with-flash-appearing-on-top-of-facebo

but this talked about adding a parameter in flash embed object code in HTML

but while working on advance javascript only method of open flash chart i was using just swfobject code and hence to obtain above requested feature we need

X.addParam(“wmode”, “transparent”);

to be added in the function calling. where X is the SWFobject.

Hope this helps someone else finding solution a bit easily.

Note : tested on Firefox 3.5 and IE 6.0

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Diigo
  • email
  • HackerNews
  • Identi.ca
  • LinkedIn
  • Ping.fm
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Buzz

One Response to “JQuery facebox + flash using swfobject.js”

  1. anothermike Says:

    Great hint! This saved me hours :)

    If you are using openflashchart with symfony, you have to add the following line to the function _ofc in open_flash_chart_object.php:
    $out[] = ‘so.addParam(“wmode”, “transparent”);’;

    …and embed the chart with true for $use_swfobject e.g.
    stOfc::createChart(700, 300, ‘module/action’, true);

    Regards
    anothermike

Leave a Reply