views:

69

answers:

3

It's pretty simple. i'm calling an PHP script from my flash using navigateToURL. It runs the script and opens a new window in my browser

It's possible to just call the php script from AS3, without open a new window ?

Thanks.

A: 

You can specify the target like so:

navigateToURL(myRequest, '_self');

Hope that helps!

Tyler Egeto
Almost there, it does open the URL in the same window, but I just want the pass variables to the PHP without openning it in any window, not even the same one where my app resides.
José Joel.
+1  A: 

Are you looking to download information from the PHP script in to your app?

If so, you might be looking for URLLoader. http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/URLLoader.html

Joony
No, actually it's the other way around, I want to send variables from my app to PHP.
José Joel.
Do you care about getting a response back from the PHP script? If not, the check out the sendToURL package level function in flash.net (http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/package.html#sendToURL())
Joony
nop, I don't care about the response. But The very same URLRequest I use with navigateToURL(myURLRequest) gives me an "Error openning URL" If I try to call sendToURL(myURLRequest). Common sense dictates that it should work.
José Joel.
I know it sounds stupid, but are you sure when you navigateToURL that you're actually hitting the script?
Joony
A: 

flash.net.sendToUrl() may be of use.

http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/package.html

Matt W
Weird, The very same URLRequest I use with navigateToURL(myURLRequest) gives me an "Error openning URL" If I try to call sendToURL(myURLRequest). Common sense dictates that it should work.
José Joel.