Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can't Link to a URL from FLA

Community Beginner ,
Mar 14, 2017 Mar 14, 2017

This used to work but it no longer works. Very frustrating. If I paste the URL from the code below into a browser, it works. However, if I run this as a SWF file, it doesn't work. You need to wait for the default time out and you'll eventually get an IOError 2032. A few weeks ago this worked and I have four previous projects packaged as AIR for Android and AIR for iOS and it worked. I don't know why it's stopped working.

Here's the code:

var fname = "Mac";
var lname = "Donald";
var email = "mac@farm.com";
var baseURL = "http://www.pjrules.com/litnip/";

var post = baseURL + "newlogin.php?fname="+fname+"&lname="+lname+"&email="+email;
var urlLogin:URLRequest = new URLRequest(post);

var urlLoadLogin = new URLLoader(urlLogin);

urlLoadLogin.dataFormat = URLLoaderDataFormat.VARIABLES;
urlLoadLogin.addEventListener(Event.COMPLETE, loginData);
urlLoadLogin.addEventListener(IOErrorEvent.IO_ERROR, IOErrorHandler);

function loginData(e:Event): void {

var uid = urlLoadLogin.data.result;


trace("In loginData and uid = " + uid);

}

function IOErrorHandler(e:Event): void {

trace("Error: " + e);


}

I sent a similar request two weeks ago but there's been NO response. Sure could use some big brains to help out here.

Cheers,

368
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 14, 2017 Mar 14, 2017

assuming your html and swf are on pjrules.com, use a relative path to your php file, not absolute.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2017 Mar 15, 2017

Right now I'm running it on my desktop but eventually it will be a mobile app. I have made a test file and I got it to work but the main app won't work. The code is the same.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2017 Mar 15, 2017

test on a mobile.

you're going to waste time fixing a security issue that won't exist or will be different when you move to mobile testing.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 14, 2017 Mar 14, 2017

If you're just testing in Animate, try a debug test. Then you'll see the security errors that are going on.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 15, 2017 Mar 15, 2017

Is this something to do with having to use https not http?

AIR 20.0.0.233 URLMonitor broken with iOS 9 ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2017 Mar 15, 2017

Thank you Yachts9999.

It was working with HTTP before. I now know that the firewall at work will prevent my app from talking to the server. However, at home it won`t insert a record. I have made a test file that will insert a record but it`s the same code as my main app file and it doesn't work. Still digging into it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2017 Mar 15, 2017

Thanks Colin. I have tried it in debug mode. No other information came back. I did figure out that I can not connect at work because of a firewall but I can connect at home. However, there's no error at home but there is no updating of the database file. I'm starting to think that it may be my PHP coding now. I'm looking into that.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 03, 2017 Apr 03, 2017

Thank you all for your feedback. I have pushed this to a mobile device and made sure I had the appropriate permissions on the device (manifest XML file settings). Still no luck. What really bothers me is that it was working and then on March 3rd it stopped working. The code works in other apps and in the test file I created. So what's wrong with my master file? I'm baffled. I may end up rebuilding the master file and just copy the key frames over. I'm hoping to avoid a rebuild though and would like to know a solution. Grrrr.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2017 Apr 03, 2017
LATEST

your code looks like it works for me.  your uid is 65 and when i send other user names the uid increments as expected if the names are being added to a database.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines