views:

36

answers:

2

i have a website, in which there is a lightbox style iframe popup, which contains a flash clip.

right now, the lightbox come up as a popup on the website, and then the flash loads [with a nice loader].

the thing is, i want to see if its possible to load this entire page in the bg, and only pop it up when the flash is fully loaded..

what say you? thanks!

A: 

You could get Flash to trigger the popup Javascript function once its loaded using the ExternalInterface

daidai
A: 

Define a function in the parent frame that just shows the iframe/lightbox...

function showFlashIframe() {
  $("#lightbox,iframe").show();
}

Set an onload handler to your iframe that calls the aforementioned function. This event shouldn't fire until the entire window is loaded...

$("iframe").load(function() {
  top.showFlashIframe();
}

Set the URL of the iframe (which should be hidden at this point) to the page that loads the Flash movie...

$("iframe").attr("src", "URL_HERE");
Josh Stodola