# Whats wrong with my code here?

**URL:** https://forum.kirupa.com/t/whats-wrong-with-my-code-here/152862
**Category:** flash
**Created:** [June 27, 2005, 8:52pm UTC](https://forum.kirupa.com/t/whats-wrong-with-my-code-here/152862 "2005-06-27T20:52:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Cozmek](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@Cozmek](https://forum.kirupa.com/u/Cozmek)
#### Post date: [June 27, 2005, 8:52pm UTC](https://forum.kirupa.com/t/whats-wrong-with-my-code-here/152862/1 "2005-06-27T20:52:37Z")

</div>

Here’s a good one for you!  
I have used some code from a kirupa tutorial to load a centred html frame from flash.  
This includes the foloowing action script in each button:

on (release) {  
// customize the window that gets opened  
// 0 equals NO.  
// 1 equals YES.  
address = “[http://www.cozmek.com/p4/ogs2eu.htm](http://www.cozmek.com/p4/ogs2eu.htm)”;  
target\_winName = “order”;  
width = 520;  
height = 450;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 0;  
resizable = 0;  
// sends data back to the function  
openWinCentre(address, target\_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
}

There is also some action script that is placed in a new frame on the same keyframe as the buttons:

Movieclip.prototype.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {  
getURL (“javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open(’” + url + “’,’” + winName + “’,’” + “width=” + w + “,height=” + h + “,toolbar=” + toolbar + “,location=” + location + “,directories=” + directories + “,status=” + status + “,menubar=” + menubar + “,scrollbars=” + scrollbars + “,resizable=” + resizable + “,top=’+((screen.height/2)-(” + h/2 + “))+’,left=’+((screen.width/2)-(” + w/2 + “))+’” + “’)}else{myWin.focus();};void(0);”);  
}

When I test this on my pc the centred window pops up perfectly.  
However, when I upload the files to the server and click the buttons, absolutely nothing happens…No html frame loads!!!

The buttons all load on level 35 in my flash movie and I need to have them load from this level as it would take months to change it all.

Does anyone know how i can overcome this major problem!!!

By the way, I have tried using both the short version of the html link as above in the code and also I have tried using the full URL. But irrespective of that…the ■■■■ html page isn’t loading at all!!!

Here’s the site address to give you an idea:

[http://www.picture4.me.uk](http://www.picture4.me.uk)

Thanks in advance folks!!!
