# Help with autorun cd and html

**URL:** <https://forum.kirupa.com/t/help-with-autorun-cd-and-html/59978>\
**Category:** Uncategorized\
**Created:** [August 5, 2004, 7:53am UTC](https://forum.kirupa.com/t/help-with-autorun-cd-and-html/59978 "2004-08-05T07:53:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![freedejm](https://avatars.discourse-cdn.com/v4/letter/f/5daacb/32.png) [@freedejm](https://forum.kirupa.com/u/freedejm)\
**Post date:** [August 5, 2004, 7:53am UTC](https://forum.kirupa.com/t/help-with-autorun-cd-and-html/59978/1 "2004-08-05T07:53:21Z")

</div>

i have a flash movie i wanna launch from a cd… i know how to do it normally, but i dont want toolbars and such… i can do this with javascript, but it is usually from a splash page which includes some of the script… who knows how to include all the appropriate code in just the one html file so that when executed it is the proper size and has no scroll, menu, and so forth?

---

<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:** [August 5, 2004, 10:05am UTC](https://forum.kirupa.com/t/help-with-autorun-cd-and-html/59978/2 "2004-08-05T10:05:58Z")

</div>

nm ill just use this script… it leaves a small window open… anyone know the function to automatically close a window?

\<head\>

\<script language=“JavaScript”\>

window.moveTo(0,0);  
window.resizeTo(0,0);

function newWindow(url, height, width) {  
nameW=‘feature’  
if (navigator.appVersion.indexOf(‘4’) != -1) {  
// Vars for centering the new window on Version 4 Browsers  
xTop = screen.width/2 - (width/2);  
yTop = screen.height/2 - (height/2);  
window.open(url, nameW, ‘height=’+height+’,width=’+width+’,scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=’ + xTop + ‘,top=’ + yTop + ‘’);  
} else {  
window.open(url, nameW, ‘height=’+height+’,width=’+width+’,scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=150,top=200’);  
}  
}  
\</script\>

\</head\>

\<BODY ONLOAD=“newWindow(‘test2.html’,400,600);”\>

\</body\>

\</html\>

---

<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:** [August 8, 2004, 4:32am UTC](https://forum.kirupa.com/t/help-with-autorun-cd-and-html/59978/3 "2004-08-08T04:32:45Z")

</div>

```php
self.close()

```

you can call it from flash:  
[AS]on(release){  
getURL(‘javascript:self.close()’);}[/AS]
