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 5843501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:09:47+00:00 2026-05-22T12:09:47+00:00

I’m beginner to AS3 and I’m using FlashDevelop as IDE and I’m trying to

  • 0

I’m beginner to AS3 and I’m using FlashDevelop as IDE and I’m trying to connect to AMF3 service (amfphp) and get user details.

I can connect to AMF service with this code in AMFinit() function…

private function AMFinit():void{
    AMFService.objectEncoding = ObjectEncoding.AMF3;
    AMFService.connect(AMFServiceURL);
    AMFService.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

    var responder:Responder = new Responder(AMF_MyUserInfo, AMF_onFault);           
    AMFService.call("Danisman.GetUserWithIdentifier", responder, user_identifier);

    // I NEED TO USE returned object data here!!
}

on AMF_MyUserInfo() function I can get object returned from Responder and I can trace it successfully, here is the code

private function AMF_MyUserInfo(res:Object):void {
    AMF_onResult(res);
    trace(res.user_ID + res.username);
}

But to use outside the AMF_MyUserInfo() function I want to copy that “res” object to another object. I tried with specifing an object in Class and set res to this object in AMF_MyuserInfo() function with “this.myobject = res” but it didn’t work. I also tried “this.myobject.username = res.username” but it didn’t work also.

I’m newbie to OOP, how can I use this res object globally or in AMFinit() function?

Thanks for your help…

  • 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-05-22T12:09:48+00:00Added an answer on May 22, 2026 at 12:09 pm

    if you can trace the res value in the function then everything should be ok. Can not tell what can be wrong.

    However i’m not familiar with AMF services. So can not tell you how it handles your res object. Because this what is happeing with objects in AS3:

    var startObject : Object;
    var dublicate : Object;
    
    startObject = new Object ();   // creating new object
    startObject.userID = 'myname'; // setting some parameters there
    
    dublicate = startObject;       // referencing you dublicate to the startObject
    startObject.userID = null;     // changeing startObject property
    trace ( dublicate.userID );    // dublicate is also affected ( output: null )
    
    // another example
    startObject = new Object ();   // creating new object
    startObject.userID = 'myname'; // setting some parameters there
    
    dublicate = new Object ();     // creating new dublicate object
    dublicate.userID = startObject.userID; // setting the dublicate parameter
                                           // with start Object parameter
    
    startObject.userID = null;     // changing startObject property
    trace ( dublicate.userID );    // dublicate is not affected, because it is not
                                   // a reference but independant object.
                                   // ( output: myname)
    

    If you want to use any property globaly create new class:

    package
    {
        public class GlobalVariables
        {
            static public var userName : String;
            static public var userID : String;
        }
    }
    

    Then you can access them like this:

    GlobalVariables.userName
    

    hope it will help you a bit.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.