resize shadowbox to fit imagae

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

resize shadowbox to fit imagae

braemore
Hi i have got the btn to call shadowbox now from my flash movie with this html code. I now need to figure how to resize the shadowbox so that when it opens my image fits in it. i know its something simple but im lost here i keep getting different errors when i change the code below. can anyone shine some light as to something i need to paste in or what needs to be added. greatly appreciated

<!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>
<!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">
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script><head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>Flash Shadowbox </title>
        <link href="inc/a.css" rel="stylesheet" type="text/css">
        <link rel="stylesheet" type="text/css" href="inc/shadowbox.css">
<script type="text/javascript" src="inc/swfobject.js"></script><script type="text/javascript" src="inc/jquery.js"></script><script type="text/javascript" src="inc/shadowbox-jquery.js"></script><script type="text/javascript" src="inc/shadowbox.js"></script><script type="text/javascript"> $(document).ready(function(){ var options = { resizeLgImages: true, loadingImage: "images/bmlarge.jpg", displayNav: true, handleUnsupported: 'remove', keysClose: ['c', 27], // c or esc autoplayMovies: false }; Shadowbox.init(options); }); function abrirSB(type, title, url) { Shadowbox.init({skipSetup: true }); Shadowbox.open({type: type, title: title, content: url}); }; </script></head>
<body bgcolor="#ffffff">
<div id="main">
        <div id="sub">
                <div id="subart">
                        <div id="subheader">
                                <div class="subframe">
                                       
                                        <p> </p>
                                        <center>
                                                <div id="flashcontent"></div>
                                                <p><br>
                                               
                                                <script type="text/javascript"><!-- var so = new SWFObject("braemoresite1.swf", "sotester", "1080", "720", "8", "#FFFFFF"); so.addParam("wmode", "window"); so.addParam("allowScriptAccess", "always"); so.write("flashcontent"); // --></script>                                                </p>
                                        </center>
                                </div>
                        </div>
                </div>
        </div>
</div>
<script type="text/javascript"> <!-- swfobject.registerObject("FlashID"); //--> </script></html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>
Reply | Threaded
Open this post in threaded view
|

Re: resize shadowbox to fit imagae

DgAPc
try this replace this
Shadowbox.open({type: type, title: title, content: url});
with this
Shadowbox.open({type: type, title: title, content: url, height: height, width: width});

and in flash add the height and width.