Launch ThickBox from Flash with AS3

Just read a great article on DesignFission Blog about how to launch ThickBox from Flash AS2 using the ExternalInterface class. ExternalInterface allows you to interact with external scripts in the browser.

Here’s an example of the code AS3 stylee:

//Import the class
import flash.external.ExternalInterface;

someButton.addEventListener(MouseEvent.MOUSE_UP,function():void {
ExternalInterface.call(”tb_show” , null ,”somePage.html?keepThis=true&TB_iframe=true&height=120&width=250” , false);
}
);

Just change the green text to the code you would put in your href to launch ThickBox and you are good to go. Make sure you are bringing all the necessary ThickBox styles and classes into your page as well.

Read the article