Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8639003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:53:15+00:00 2026-06-12T10:53:15+00:00

When communicating with server via GET to a php script, I need a feedback,

  • 0

When communicating with server via GET to a php script, I need a feedback, usually in the format: status=OK&msg=No further actions&other=blablabla … so I know that was a successfull request. But AS3 is very object-oriented, so I made a Class to put it in an object:

package com.gustavopi.comm {

    public class Vars {

        public var demo:String = new String();
        public var Obj:Object = new Object();
        public var Var:Array = new Array();
        public var Val:Array = new Array();
        public function Vars(strVars:String=null) {
            var Termos:Array = strVars.split("&");
            for(var t in Termos){
                var termo:String = Termos[t];
                var Elem:Array = termo.split("=");
                Obj[Elem[0]] = Elem[1];
                Var.push(Elem[0]);
                Val.push(Elem[1]);
                demo += Elem[0]+": "+Elem[1]+String.fromCharCode(13);
            }
        }

    }

}

The advantage is quickly detect errors using “demo” method, but the vars are properties of Obj, not of the object itself, wich is a little strange – but works.

I’m not sure if this is the best way to deal with the task or if I did something that already exists in the AS3 core. What do you think about?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:53:18+00:00Added an answer on June 12, 2026 at 10:53 am

    First, your variables should start with a lower case whereas the classes start with an upper case.

    There are several ways to get some data from a server, yours is the simplest and oldest one. It was commonly used with AS2. That is exactly why there is already a class to handle this:

    var urlVariables:URLVariables = new URLVariables("firstName=Tom&lastName=Jones");
    trace(urlVariables.lastName + "," + urlVariables.firstName); 
    //will trace "Jones,Tom"
    

    Check out the AS3 URLVariables class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a client and server communicating via Spring remoting (using Java Serialization) over
Let us assume I'm using communicating from my mobile device to my server via
I have setup a basic WCF client/server which are communicating via Named pipes. It
I'm trying to create a loginactivity on Android communicating with a wcf server via
I have two applications communicating via RMI, a slave server (of which there will
I have following scenario: The Android clients communicate with a PHP server via HTTP
I have a client and a server communicating with datagrams (UDP) in C. The
I am communicating with a server, each message sent to the server has to
I have a Silverlight application communicating with the server side through WCF services. Initially
I am writing a simple app used for communicating between a server and an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.