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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:14:30+00:00 2026-06-05T07:14:30+00:00

I am working on a zooming square navigation project (visually like Windows Metro, but

  • 0

I am working on a zooming square navigation project (visually like Windows Metro, but squares take over the screen when clicked on). I’m having trouble getting the squares to the top layer (setChildIndex). Here is the code for when a square is clicked on:

function zoom(event:MouseEvent):void {
    // saves location and size of icons
    returnto = event.currentTarget;
    returntoX = event.currentTarget.x;
    returntoY = event.currentTarget.y;
    returntoWidth = event.currentTarget.width;
    returntoHeight = event.currentTarget.height;
    // turn off button behaviours
    event.currentTarget.buttonMode = false;
    event.currentTarget.alpha = 1;
    event.currentTarget.removeEventListener(MouseEvent.MOUSE_OVER, rollover);
    event.currentTarget.removeEventListener(MouseEvent.CLICK, zoom);
    event.currentTarget.removeEventListener(MouseEvent.ROLL_OUT, rollout);
    // put clicked box on top
    setChildIndex(returnto, numChildren-1);
    // fade out icon decor
    TweenLite.to(returnto.decor, .25, {alpha:0});
    // make square take over screen, call finished when done
    TweenLite.to(returnto, 1, {x:stage.x,y:stage.y, width:stage.stageWidth, height:stage.stageHeight, ease:Expo.easeInOut, onComplete:finished});
}

the squares are all inside a main movieclip (named navigation) on the stage (so the first square is navigation.sq_1)

I am not a Flash developer, so I’m really struggling with AS3. Hopefully this is enough info for someone to help. Thanks!
S

  • 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-05T07:14:32+00:00Added an answer on June 5, 2026 at 7:14 am

    Just try to add your returnto clip with addChild() method:

    // put clicked box on top
    addChild(returnto);
    

    Display List’s default behavior when addChild() is to put the child on top of all childs. Other children’s indexes are recounted.

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

Sidebar

Related Questions

I'm working on Zooming with Silverlight 5, My Idea is to zoom according to
Here is a working version http://jsfiddle.net/tH78C/ Here is a broken version (Zooming widget is
Working on a project where I need to add points to an array. Here
i successfully download the pdf file and it's working fine. But the problem is
A good day to you. I am working on a webpage but I got
I am working on a little project and want to implement some sort of
Im currently working on a project with pygame and am in need of being
Working on a end of the year project for school and chose to create
I've been working on a visualization project for 2-dimensional continuous data. It's the kind
I'm working on a flash project that incorporates a lot of artwork done in

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.