If you ever wondered how to implement a shadowbox or thickbox in flash then look no further!
Here are two examples
I did the shadowbox and someone else did the thickbox sorry i forgot source - if it is yours please let me know and I will acknowledge
From my experience on using both of them, i found that a shadowbox is a much better option.
Shadowbox uses javascript to hide the swf object when shadowbox is open - can display flash movies in shadowbox itself.
Thickbox relies on wmode = 'transparent' to show the thickbox on top of the flash - very crude solution which slows down you flash heavily and doesnt work in all browsers.
My hat is off to you. However, this is written and compiled in as2. Since you posted this in the as3 forum I rewrote it in as3 (its working, to your credit of course). Oh and I love that keysClose option, so slick. In fact, I'm going to continue playing with the flash/shadowbox, if I find things of interest, I'll post here.
AS3:
Code:
button_mc.addEventListener(MouseEvent.MOUSE_DOWN, btnClicked);
function btnClicked(evt:MouseEvent){
ExternalInterface.call("abrirSB",'img', 'Title', 'images/test_image.jpg');
}
So here's a good one. If I have a very simple datagrid with a CHANGE event handler, the ExternalInterface.call() does not work. If I trace(ExternalInterface.call) I receive a value of NULL. Can anyone give me a reason? Thanks!
I'm having issues loading .html files and .swf files. I've included the html and swf shadowbox javascript files with still no luck. What needs to be tweaked for this to work? Any suggestions? Thanks!
Hey guys.. thnks for the excellent script..
I m using the thickbox one...
Basically i had a flash site from which i wanted to open a new window without making people to close the page.. i did that..
I m using AS2...and the page is also opening perfectly..
But Just one query..
Suppose i have a flash site.. and on clicking a button , thickbox opens up containing a new webpage.. now if i click on any link inside the thickbox rightnw it is opening it in the new window.. whereas i want the page to be displayed inside the iframe only..
can someone please help me out..
I'm having issues loading .html files and .swf files. I've included the html and swf shadowbox javascript files with still no luck. What needs to be tweaked for this to work? Any suggestions? Thanks!
yeah me too, i cant load any other media besides images, i tried the setps from the autor's the wibsite to load all palyers, as it seems just the img player was added to the html, but is not working:
could somebody please post a code to make all players to work with flash, preference AS2, i know that this is a AS3 but the threat is aready made... thanks for the help,
Sorry to bother you. I'm trying to do this exact same thing. I have a simple text button in SWiSHmax that I'm trying to finaigle to trigger this effect and I just can't seem to figure it out. If anyone is familiar with SWiSHmax and can advise me or just knows what code I can put in for the button in my flash movie as well as for my HTML page it's embedded into and any tweaking I may need to do to the shadowbox files, I'd really appreciate it, please. Thank you.
// - - - - - - - This is an event handler - - - - - - - //
function handleCLICK(event:MouseEvent):void {
if (event.target == myButton1)
{
// handle this event
ExternalInterface.call("abrirSB",'img', 'My Image 1', 'myimage1.jpg');
}
if (event.target == myButton2)
{
// handle this event
ExternalInterface.call("abrirSB",'img', 'My Image 2', 'myimage2.jpg');
}
if (event.target == myButton3)
{
// handle this event
ExternalInterface.call("abrirSB",'img', 'My Image 3', 'myimage3.swf');
}
}
// Now we register the event
myButton1.addEventListener(MouseEvent.CLICK, handleCLICK);
myButton2.addEventListener(MouseEvent.CLICK, handleCLICK);
myButton3.addEventListener(MouseEvent.CLICK, handleCLICK);
// - - - - - - - This is the end of the event handler - - - - - - - //
One more thing, I've tried putting these links in the body of my HTML page using this code: