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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:18:32+00:00 2026-05-28T03:18:32+00:00

I was wondering if someone could explain or point me in the direction of

  • 0

I was wondering if someone could explain or point me in the direction of how to implement an API that uses JSON in ActionScript 3.0. What I specifically want to know is how would I grab specific information. The following is how I do it in XML but I don’t know how I would do something similar in JSON as in getting the equivalent of an XML tag. For example with the twitter API I’d like to grab the text https://dev.twitter.com/docs/api/1/get/search

        -----------XML Example:
        //create a new XML object with the XML
        xml = new XML(e.target.data);

        //This gives us an XMLList (an array) of <item> tags
        var all_items:XMLList = xml.channel.item;

        //loop through the <item> tags
        for (var i:uint = 0; i < all_items.length(); i++)
        {
            //get contents of title tag
            var titleText:String = all_items[i].title.text();

            //get contents of description tag
            var descriptionText:String = all_items[i].description.text();

            //get contents of link tag
            var linkText:String = all_items[i].link.text();

            //get contents of pubDate tag
            var dateText:String = all_items[i].pubDate.text();
        }

——-NEW CODE—–

public function onJSONLoaded(e:Event)
{

trace(“onJSONLoaded() called”);

        json = JSON.decode(e.target.data);

        trace("json=" + json);
    } 

and the trace for it is

onJSONLoaded() called

json=[object Object]

  • 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-28T03:18:32+00:00Added an answer on May 28, 2026 at 3:18 am

    For working with JSON response, you can use this library
    https://github.com/mikechambers/as3corelib

    Add as3corelib to your project, then in the event handler instead of XML you can give

    var response:Object = JSON.decode(e.target.data);
    

    then you will be able to access other properties like response.property

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

Sidebar

Related Questions

I'm wondering if someone could explain (or point me in the right direction) where
Just wondering if someone could point me in the right direction of how to
Just wondering if someone could explain this to me? I have a program that
I was wondering if someone could explain to me how to make a simple
I am wondering if someone could explain how I can utilise tags in an
Wondering if someone could please explain the difference between these two queries and advise
I was wondering if someone could tell me what I am doing wrong that
I was wondering if someone could explain how the following code works: public interface
I was wondering if someone could explain in detail what (int)(l ^ (l >>>
I was wondering if someone could explain to me what the #pragma pack preprocessor

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.