PDA

View Full Version : wierd prob, should be simple but isn't



dzynz
12-16-2005, 07:11 PM
Ok, so I have this art piece that consists of a small flash movie that at a certain point in it's timeline is set to open a new window of itself. That window then has this javascript:

<script type="text/javascript">
function cleanupAndMove() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
window.locationbar.visible = false;
window.menubar.visible = false;
window.statusbar.visible = false;
window.toolbar.visible = false;
window.personalbar.visible = false;

// cleaned up, now call resize
moveAndResize(screen.width, screen.height);
}

function moveAndResize(screen_x, screen_y) {
window.resizeTo(190,172);
window.moveTo(Math.round((Math.random()*screen_x)+1),Math.round((Math.random()*screen_y)+1) );
}
</script>

As you can see the goal is to eliminate excess browser toolbars, to resize it and to move it to a random position on the screen. This script works pretty well when run locally, but once I put it on my server discovered it does not work at all.

However, if I eliminate the line
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
resize and reposition functioning returns... but all the toolbars remain.

I tried to engineer a solution by adding javascript to my flash file in order to call the new window as a popup without toolbars. No matter what I did, however, all my browsers still treated it as a regular _Blank window (despite there being no target assigned in the getURL command).

Here is a link to the movie file:
http://www.geniuspad.com/dev/gallery/06-Projects/lg/source/phage/movie.htm

Here is a link to the source files:
http://www.geniuspad.com/dev/gallery/06-Projects/lg/source/phage.zip

Any help asap would be much appreciated. I have an entire site waiting to go live with this as the only hang up.

Thank you in advance!

Osiris
12-17-2005, 12:01 AM
Why not just use window.open() and then set the flags in there to make it so that it doesn't show any toolbars?