"website.com" is a dummy url. I don't have access to the js file that opens the popup so I have no idea what the parent page's name is. I'm doing this wrong, I know.
function mouseUpHandler(event:MouseEvent):void { var url:String = "http://www.website.com"; ExternalInterface.call("window.opener.location.href='" + url + "'"); ExternalInterface.call("self.close()"); }
Closing the popup works, but not the url load,even if I comment out the line that closes the popup.
Thoughts?
ExternalInterface makes calls to external functions, so the best approach would be to have a js function that will open the url and then you call that function from within flash, passing the 'url' parameter to that function.
I realize that, but only have access to the flash file. I'm not allowed to modify any other file on the site.
not even the html? the JS function can live in the html file that calls the swf.
Nope, I'm only allowed to modify the swf.
ooh that sucks
Yes, yes it does. In any case, window.opener.location.href works in javascript if it's embedded in the popup & called from an html link, any reason it wouldn't work in Flash?
I know how to do it with getURL but of course this isn't as2 any more, I was under the impression ExtrnalInterface.cal was the method for using javascript now.... please do correct me if I'm wrong!
You're right that ExternalInterface is the correct communication method with JS; however, Flash has always been held into different security schemes than anything else. That means you can't (as far as I understand) just write willy-nilly JS scripts due to the security restrictions. There's a difference triggering JS functions and writing the JS in Flash. Maybe that's why it doesn't work.
OK, I'll buy that. so given what I want to do, do you have any suggestions other than get access to the other files? Can it, unlike pinball, be done in Flash?
not sure..... http://www.gotoandlearnforum.com/viewtopic.php?f=29&t=20762 He's using URLRequest to pass a JS function...try that.
Interesting... though my code achieves what he's trying to do: function mouseUpHandler(event:MouseEvent):void { ExternalInterface.call("self.close()"); }
In any case, I posted my question there too, let's see if I get any workable replies.

My only thought was maybe the ExternalInterface class passes info different than a straight URLRequest string.
A reasonable thought. I will check into it.
saints alive!
function mouseUpHandler(event:MouseEvent):void { var jscommand:String = "window.opener.location='http://www.website.com';self.close();"; var req:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);"); navigateToURL(req, "_self"); }
Works a charm. Thanks for the tips, Storm.
now you have to like me 
ExternalInterface is really only the best for triggering JS functions.
Glad you got it.
Well, you're still from Edmonton but you do give good Flash advice.

I owe you one.

not from Edmonton....never lived in Edmonton....never will.....I'm southern.
and I will get there to visit you one day. I keep saying I'm coming there. Cali is too far from all you eastern-type shenanigans.
Ah, I had you pegged for a Deadmontonian, my bad. You're always welcome to pull up a seat at the bar. :beer: