flash btn to shadowbox single img

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

flash btn to shadowbox single img

braemore
hello im new to shadowbox seen it on websites before and thought it would be cool to add to my site. I have made my page mostly in flash as3. i have figured out how to install shadowbox3 on dreamweaver on plain index site now i want a button to call an image to show in shadow box. can someone lay out the steps for me i just cant figure it out.

Here is my HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="shadowbox.css">
<script type="text/javascript" src="shadowbox.js"></script><script type="text/javascript"> Shadowbox.init(); </script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>index</title>
</head>

<body>

</body>
</html>


here is my button as3

product1_btn.addEventListener(MouseEvent.CLICK, shadowbox);
function shadowbox(event:MouseEvent){
        trace("product1_btn clicked")
        navigateToURL("javascript:openShadowbox('movie.swf', 'swf', 'Title')");

i want the button to open the solo "bmlarge.jpg"

do i need to create a .JS file? also how do i get the flash movie to take the code without giving me error?
is there something with the way my files are set up do they all need to be in one folder. (meaning my flash project and dreamweaver project)?  

any help would be greatly appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: flash btn to shadowbox single img

DgAPc
well for the flash code you forgot to close it off with }
so replace this with
product1_btn.addEventListener(MouseEvent.CLICK, shadowbox);
function shadowbox(event:MouseEvent){
        trace("product1_btn clicked")
        navigateToURL("javascript:openShadowbox('movie.swf', 'swf', 'Title')");
}

Haven't messed around with AS3 to know if the rest of the code will work.
Reply | Threaded
Open this post in threaded view
|

Re: flash btn to shadowbox single img

braemore
hey thanks for the reply this is what i got for the as3 to work

import flash.external.ExternalInterface;
timeshirt_btn.addEventListener(MouseEvent.CLICK, shadowbox);
function shadowbox(event:MouseEvent){
        trace("Timeshrit_btn clicked")
        ExternalInterface.call("abrirSB",'img', 'bmlarge', "images/watchlarge.jpg");