Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1018221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:49:35+00:00 2026-05-16T10:49:35+00:00

I have a flash object in my page that i want to make as

  • 0

I have a flash object in my page that i want to make as large as possible. The page is pretty much bare, except for one thing: a bar at the top.

Html:

<head>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
// setting flashvars, params, attributes
//...
// adding swf
swfobject.embedSWF("myflash.swf", "myAlternativeContent", "100%", "100%", "9.0.114", "swfobject/expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body>
<div id='banner'>
this is random text, could be an image, could be a menu, with a certain random height i cannot predict
</div>
<div>
    <div id="myAlternativeContent">
    </div>
</div>
</body>

When i view this page in IE 8, the flash object has indeed a height of 100%, but it is of the browser window, not of the parent div. That means i get a vertical scrollbar and if i scroll it, the flash fills the entire window. This is not what i want. I want the page to have no scrollbar, and the flash to have the height of the rest of the window.

I tried this solution with javascript (after the closing div):

<script language="javascript" type="text/javascript">
function getWindowHeight() {
  // by http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
  var myHeight = 0;
  if( typeof( window.innerWidth ) == "number" ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in "standards compliant mode"
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  return myHeight;
}
var otherheight = document.getElementById("banner").offsetHeight;
document.getElementById("myAlternativeContent").parentNode.style.height = (getWindowHeight() - otherheight) + "px";
</script>

But then i see that even though the height of the parent div gets set to the correct amount, the flash object completely ignores it and does not redraw or whatever, and just keeps its merry height.

How can i accomplish what i want to do? No scroll bar, a banner thing on top, and then the rest of the window filled with my flash object?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:49:35+00:00Added an answer on May 16, 2026 at 10:49 am

    Modified answer: Try modifying the call to swfobject.embedSWF so that the height you give it is calculated correctly instead of being a %age – ie set it to:

    (getWindowHeight() - otherheight)
    

    You also need to be careful in case the window is resized… (See point #1). This is an issue your current code has as well

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an html page with a flash object that provides video chat using
I have a plain html web page with an embedded flash object. Based on
Let's say we have two flash objects on the same html page. I want
I have a flash object that takes up the whole browser on my website.
I have a flash object embedded in my website with the embed code that
I have a FLASH object that I mouse over which in turn calls the
I have a flash object that I am trying to show and hide along
I have a program that creates an html5 page. It actually creates a flash
I have an object in a page that has neither data nor type so
I have a HTML page that contains a flash file and some a JavaScript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.