I am currently creating a full browser flash site that is deployed
using SWFObject.  Below is a link to the javascript file I use to
implement the functionality:

http://www.rob-phelps.com/js/embedFullBrowserFlash.js


the associated 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"; lang="en" xml:lang="en">

<head>
<link rel="shortcut icon" href="images/site_icon.png" type="image/
vnd.microsoft.icon" />
<link href="css/site.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="js/
swfobject.js"></script>
<script language="JavaScript" type="text/javascript" src="js/
swfaddress.js"></script>
<script language="JavaScript" type="text/javascript" src="js/
embedFullBrowserFlash.js"></script>
</head>

<body>
<noscript>
        <div id="nojs">To view this site properly, please enable JavaScript
on your browser and reload the page.</div>
</noscript>
    <div id="container">
        <div id="altContent">
            <div id="noFlash">
                <div id="logo"></div>
                <p>
                    If an orange bar has appeared at the top of your
browser window, follow those instructions first.<br />
                    Otherwise, please download Adobe Flash Player to
view this site.
                </p>
                <a href="http://www.adobe.com/go/getflashplayer/";><div
id="flashPlayer"></div></a>
            </div>
        </div>
    </div>
</body>

</html>


And the associated CSS:

http://www.rob-phelps.com/css/site.css


Everything works great, except for an issue that arises for users with
smaller screens.  In the artwork section, I have created a "lightbox"
so the user can view the work as large as possible (according to the
size of their browser window).  Well, because of the above js, my SWF
will never interpret the stage as being smaller than the min-width and
min-height of the container div.  So if a user's window is small
enough to activate the scrollbars, and then they open the lightbox,
the image appears according to the dimensions of the scrollable area -
not the viewport of the browser.

I understand AS3, but am a complete novice when it comes to
JavaScript.  The above js code was a copy and paste job that I found
online from one of the creators of SWFObject.  I simply altered the
numbers to fit my needs.

Having said that, is there anyway I can alter the above js and/or css
by calling some sort of js function (from my SWF using a method like
ExternalInterface) that would effectively change the min-dimensions of
the container div on the fly?

Basically, when the user opens the lightbox in my SWF file I want to
"disable" scrollbars so that the SWF stage dimensions will equal those
of the browser's viewport.

Is this possible?  Am I analyzing this correctly?  Is there a better
way to go about this?

Any help would be greatly appreciated.  Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.

Reply via email to