Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open a popup from flash without js

Status
Not open for further replies.

paola13

Technical User
Oct 22, 2001
36
IT
I'm tring to open a pop up with this script in the main timeline of the movie:


Movieclip.prototype.centra = function (nome,titolo,lar,alt,feat){
var w = System.capabilities.screenResolutionX/2;
var h = System.capabilities.screenResolutionY/2;
var x = Math.round(w-(lar/2));
var y = Math.round(h-(alt/2));
getURL("javascript:window.open('"+ nome + "','" + titolo + "','width=" + lar + ",height=" + alt + ",screenX=" + x + ",left=" + x + ",screenY=" + y + ",top=" + y + "," + feat + "');void(0);");
}

and in the button:

on(release){
centra('pippo.htm','mia',700,300,'status=yes');
}

but all i see is a blank window with a text:"object" and an empty popup.
Perhaps the problem is in the location of my movie. It is in the _level2, after loadin from the _root movie with loadmovie("_level2").
Thanks to everybody!!!
 
You get that result when testing this in the application itself. If you test it online or through the .swf, it works normally. Regards,

oldman3.gif
 
I try open directly the swf (without opening flashMX) but everything is still the same.
Do you think loading in the level2 is a problem? The openwindow function and the button are in the second level.
Help please... i don't understand why my swf doesn't work...
 
Well, if the popup is actually opening, than the function is working. Have you tried it in a main movie, rather than on a level. Might be a path problem also. Is the swf you're trying to open in the same folder as the project? Regards,

oldman3.gif
 
yes, swf-popup is in a htm page (pippo.htm), inside the same folder of the swf-projector and swf-popup. I tried also to put the function that open the pop up in the projector file but nothingh changes... I can understand... i'm getting crazy.. :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top