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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:08:15+00:00 2026-05-15T19:08:15+00:00

I am facing a situation that I have problem understanding… I am writing a

  • 0

I am facing a situation that I have problem understanding…

I am writing a little Drag and Drop game that comes with its own solution. Game starts on frame 1, solution of frame 150.

To show the solution, I chose to display all drag items in their original position and fade them out one by one while concurrently fading in another instance in the correct position.

In the “game” part, I made sure that all dragged items get added back to the stage to ensure that drags would not pass behind other drag-able objects. So at the end of my drag function, I added the line “this.parent.parent.addChild(this.parent)”.

Where I get puzzled, is when I click the solution button, all dragged instances remain in place and no longer respond to Timeline actions. If I take out the “this.parent.parent.addChild(this.parent)” bit, all work fine (except for being able to drag behind other object)

Can someone explain this behavior to me?

TIA


Humm… I guess I spoke too soon!

My scenario is as follows:
I placed 5 instances of a choice MC at the first level on my stage. The choice MC contains an instance of dragButton MC (mapped to its own class) and an instance of choiceText MC looking like:


[dragButton] choiceText


The intent is for the user to drag the dragButton MC on top of a specific instance of a choiceGroup MC.

To ensure that any dragged item passes over any other, I added

this.parent.parent.addChild(this.parent);

at the end of the dragButton’s drag function. This has the effect of re-adding the choice MC containing the selected dragButton.

After further testing, I came to realize that the objects are getting added to the right “container” BUT cease to be “linked” to Timeline preferences.

This happens in the “correction” area where I fade out the choice and then fade in another instance in its intended location. However, the “fade” (Classic Tween) does not grab any MC that have been re-added to the stage.

Is there a workaround to this short of having to code my “fade-in/fade-out” rather than using timeline tweens?

TIA

  • 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-15T19:08:16+00:00Added an answer on May 15, 2026 at 7:08 pm

    It sounds like you are adding your dragged instances to the wrong parent. In actionscript, you can take any object and re-assign it to any parent. So, you will need to look for which parent it really needs to be attached to.

    If you add a child MC (MovieClip) to another parent MC that is visually below other parent clips, then it too will be below the other parent clips. By being an internal component of the new parent MC, it inherits the parent’s z-index, no matter where that parent is located.

    I would recommend checking out the “insert target path” command in the actions palette.

    It allows you to navigate to the clip you want to re-attach from one parent to another and then see what path it is recommending.

    You may be surprised at what the paths actually are from one MC (MovieClip) to another…

    Also, by using a timeline of that length, you may actually be causing the correct parent to “disappear” from the stage because it is on a keyframe that does not contain the correctly labeled MC and may have caused any code attached to it to not be loaded.

    I am not sure how you are doing things in your game, so these are all just guesses…

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

Sidebar

Related Questions

No related questions found

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.