This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > April 2004 > border problems with website





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author border problems with website
Knewt

2004-02-23, 10:29 pm

Hi all,

I am having a problem with my Flash website. I have tried all of the options
within Flash
when publishing, I still get a border. My Flash page size is 550 x 420 and I
would like
the HTML window to fit tight to my file when viewed on the web. If you open
the SWF, it is
tight to the edge. How can I get the window to open tight and to the same size
every time it
is opened?

I published both the SWF and the HTML files and loaded them to my web account,
only to
see a space around my file every time. Editing the file source dimensions, did
not work.

Can some one please take a look at my site and tell how I can fix this
problem? Thank you
in advance.

AWD

2004-02-24, 12:28 am

If I am gathering what you are saying you will have to open a popup window
that are the dimensions of your flash movie. Keeping in mind that many folks
are using pop up blockers these days and that can be problematic. If you are
unsung Dreamweaver you can have an index page with a link. On that link put
a behavior to open a new browser window. It will let you set the dimensions
and what you want in the way or toolbars. If your first page is the page
you want to be flash then you'll have to have an onload command on a blank
index page that loads the new browser window

--
Al Winchell
www.Amazingwebs.com
den.tigersquadron.com


Knewt

2004-02-24, 3:30 pm

Al,

I am using Flash to create my website. I have a Flash page called (index.htm)
that comes up first, which is the readme page. From my readme page, the user
can click the button that takes them to my website. both the readme page and
the website page open but do not fill the window.

I would like to know how I can get my Flash information to fill the window
without having to use Dreamweaver, etc.

Many thanks,
Newton


AWD

2004-02-24, 8:29 pm

I have what you need I think...this has to go on a html page that calls your
flash page. It will resize your flash movie to fit any resolution browser.
I've used it myself and it can be a bit tricky so if you have problems email
me at alwinch@msn.com . It will popup your html page that has your flash in
it and resize it to fit any browser.


<SCRIPT LANGUAGE="Javascript">
<!--
// window_size_table and screen_size_table - These two arrays provide a
// translation between screen size and desired window size. For instance,
// if the screen is 800x600 and the desired window size is 720x405, the
// first two elements in screen_size_table should be 800 and 600 while the
// first two elements in window_size_table should be 720 and 405. There
// can be as many sizes as needed, as long as the numbers are given in
// pairs.
var screen_size_table = new Array(800, 600,
1024, 768,
1152, 864,
1280, 1024);
var window_size_table = new Array(720, 405,
960, 540,
1088, 612,
1200, 675);

// default_width_percent - This setting is only used if the screen size
cannot
// be matched in screen_size_table. This is the percent of the screen
width
// that the popped-up window should occupy, expressed as a whole number.
For
// example, if the popped-up window should be 83% as wide as the screen,
set
// default_width_percent to 83. NOTE: Proportionality is YOUR problem.
var default_width_percent = 75;

// default_height_percent - This setting is only used if the screen size
cannot
// be matched in screen_size_table. This is the percent of the screen
height
// that the popped-up window should occupy, expressed as a whole number.
For
// example, if the popped-up window should be 34% as tall as the screen,
set
// default_height_percent to 34. NOTE: Proportionality is YOUR problem.
var default_height_percent = 75;

// target_html_page - The URL that the popped-up window should contain.
This
// may be relative. NOTE: This page must be on the same site as the
current
// page or the window.moveTo() command will cause a Javascript error in
// Internet Explorer.
var target_html_page = "index2.html";

// target_window_name - The name of the popped-up window. This isn't
// important unless the popped-up window needs to be further manipulated
// with Javascript.
var target_window_name = "lookandfeel";

// =====================================================================
// DO NOT CHANGE ANYTHING BELOW THIS LINE.
// =====================================================================

function open_window()
{
var i;
var window_width;
var window_height;
var window_top;
var window_left;

if (window.screen.availHeight)
{
window_height = window.screen.availHeight * (default_height_percent /
100);
window_width = window.screen.availWidth * (default_width_percent /
100);
}

for (i = 0; i < screen_size_table.length; i += 2)
if ((screen_size_table[i] == window.screen.width) &&
(screen_size_table[i + 1] == window.screen.height))
{
window_width = window_size_table[i];
window_height = window_size_table[i + 1];

break;
}

if (window.screen.availHeight && (window.screen.availTop == 0))
{
window_top = ((window.screen.availHeight / 2) +
window.screen.availTop) - (window_height / 2);
window_left = ((window.screen.availWidth / 2) +
window.screen.availLeft) - (window_width / 2);
}
else if (window.screen.availHeight)
{
window_top = (window.screen.availHeight / 2) - (window_height / 2);
window_left = (window.screen.availWidth / 2) - (window_width / 2);
}
else
{
window_top = 0;
window_left = 0;
}

window.open(target_html_page, target_window_name, "screenX=" +
window_left + ",screenY=" + window_top + ",height=" + window_height +
",width=" + window_width +
",hotkeys=no,directories=no,menubar=no,location=no,personalbar=no,resizable=
no,scrollbars=no,status=no,titlebar=no,toolbar=no").moveTo(window_left,
window_top);
return(false);
}
//-->
</SCRIPT>
--
Al Winchell
www.Amazingwebs.com
den.tigersquadron.com


Agtred

2004-04-12, 4:42 am

I'm currently in the process of building a site in flash, and to remedy the
problem of having space around your flash movie after publishing here is what
you need to do. Open the .html file in Notepad (or similar program for
non-windows users) that Flash created when you published your movie, and you'll
see a line of code that looks like:

<BODY bgcolor="#FFFFFF">

All you need to do is insert this line of code into that tag:

topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"

So that the tag should now look similar to the following:

<BODY bgcolor="#FFFFFF" topmargin="0" leftmargin="0" marginwidth="0"
marginheight="0">

Just save and away you go.

~ Jason

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews