# I need some expert help

**URL:** <https://forum.kirupa.com/t/i-need-some-expert-help/14184>\
**Category:** Uncategorized\
**Created:** [February 23, 2003, 1:52am UTC](https://forum.kirupa.com/t/i-need-some-expert-help/14184 "2003-02-23T01:52:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eudora](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@eudora](https://forum.kirupa.com/u/eudora)\
**Post date:** [February 23, 2003, 1:52am UTC](https://forum.kirupa.com/t/i-need-some-expert-help/14184/1 "2003-02-23T01:52:18Z")

</div>

it is regarding using javascript to calculate the screen.width and height  
then using the variables to place the flash right smack in the centre…

so this is what i have so far

```php

<script language="JavaScript">
<!--
function placeFlash ()
{
var top2 = Math.round((screen.Height - 400) / 2);
var left2 = Math.round((screen.Width - 600) / 2);
document.write("<the entire object codes that flash produced>");
}
//-->
</script>

<body onLoad="placeFlash()">

```

i believe it is not correct to use document.write to do such a things? But i dunno any either codes in javascript…  
☹

can someone help me with this? or is it impossible?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2003, 2:03am UTC](https://forum.kirupa.com/t/i-need-some-expert-help/14184/2 "2003-02-23T02:03:49Z")

</div>

ehmm … use [php] and [/php] tags to show your code 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2003, 2:08am UTC](https://forum.kirupa.com/t/i-need-some-expert-help/14184/3 "2003-02-23T02:08:08Z")

</div>

eudora, if you want to place your flash movie dead center of the browser then set it into a table code like this:

```php
<table width="100%" height="100%">
<tr><td width="100%" height="100%" align="center" valign="middle">

flash embed code here

</td></tr>
</table>

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2003, 2:54am UTC](https://forum.kirupa.com/t/i-need-some-expert-help/14184/4 "2003-02-23T02:54:12Z")

</div>

> \*Originally posted by electrongeek \*  
> \*\*eudora, if you want to place your flash movie dead center of the browser then set it into a table code like this:

```php
<table width="100%" height="100%">
<tr><td width="100%" height="100%" align="center" valign="middle">

flash embed code here

</td></tr>
</table>

```

\*\*

thanks!  
that was what i needed! 🙂

and will remember abt the php codes next time  
😉
