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

  • Home
  • SEARCH
  • 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 8665279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:26:38+00:00 2026-06-12T17:26:38+00:00

After an object has been added to an array via push() , how can

  • 0

After an object has been added to an array via push(), how can you reference the x or y value of it? For example:

var Test:Sprite = new Sprite();         
Test.graphics.beginFill(0x000000);
Test.graphics.drawRect(0,0,10,10);
testHolder.addChildAt(genericBlock,0);
  • 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-12T17:26:40+00:00Added an answer on June 12, 2026 at 5:26 pm

    The x and y values of any object stored in an array can be accessed via:

    var myArray = new Array();
    myArray.push(testSprite1); // First object 'pushed' into array at position 0
    myArray.push(testSprite2); // Second object 'pushed' into array at position 1
    
    myArray[0].x = 50; // testSprite1.x = 50
    myArray[1].x = 100; // testSprite2.x = 100;
    
    // To referece..
    trace(myArray[0].x, myArray[1].x); // Outputs: 50 100
    

    This is a great tutorial to learn how to implement arrays and manipulate all/single elements held within them:

    http://www.republicofcode.com/tutorials/flash/as3arrays/

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

Sidebar

Related Questions

Just wondering how I can paste an object after I have selected it in
Using GCC, how can I remove a symbol from a shared object after I've
I'm having some problems with the SqlNamedQuery attribute that has been added to the
I am trying to update the textview in my gallery after it has been
I know this question has been asked many times and after going through posts,
I'm sure this problem has been addressed before but I can't find a 'duplicate'.
In order to determine how often some object has been used, I use a
Is there a way to manipulate Domain object after the validation is completed in
I have a function to follow the object after the mouse, and I want
How does Iterator throw ConcurrentModificationException when we are adding some object after current node

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.