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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:02:13+00:00 2026-05-26T15:02:13+00:00

with the formula below I can center one image horizontally. var xPoint= stage.stageWidth /

  • 0

with the formula below I can center one image horizontally.

 var xPoint= stage.stageWidth / 2 - imgWidth / 2;

In case if I may have more than one image, how can I center them horizontally?

  • 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-26T15:02:14+00:00Added an answer on May 26, 2026 at 3:02 pm

    You need to center them based on their total width. Assuming they all have the same width, something like that should work:

    var imageX:int = (stage.stageWidth - images.length * imgWidth) / 2; // Assuming all the images have the same width
    
    for (var i:int = 0; i < images.length; i++) {
        var image:* = images[i];
        image.x = imageX;
        imageX += imgWidth;
    }
    

    If they have different width, just calculate the total width by looping through the images.

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

Sidebar

Related Questions

I have one formula field in Crystal report as given below global numberVar detailLine
How can I write Erlang B Formula as you see below in MATLAB? I
What is the formula for calculating the distance between 2 geocodes? I have seen
I have the following formula float mean = (r+b+g)/3/255.0f; I want to speed it
In an Excel formula you can use =ISERR(A1) or =ISERROR(A1) In a VBA macro
I have a formula that distribute reptitions (payments) into columns that represents months. I
we have an interesting formula to figure out. First, we count the following, where
Suppose I have a column called item code as below: ----- ------ |row| |code|
I want a function that can do the below calculation and return the result.
Currently the formula I am using is below, but it is less accurate as

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.