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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:48:57+00:00 2026-05-15T09:48:57+00:00

i create three circles. if a circle is dragged to right side of the

  • 0

i create three circles. if a circle is dragged to right side of the stage, it becomes invisible and vice versa. when MOUSE_UP is invoked, it must stay in its last position.

so in the appear() function how can i assign the selected circle to current_mc?

function createCircles(evt:Event):void
{    
    for(i=0; i<3; i++)
    {
    var figure:Sprite=new Sprite();            
    figure.circle.x=10;
    figure.circle.y=i*figure.circle.height*1.02;
    figure.circle.buttonMode=true;
    figure.circle.addEventListener(MouseEvent.MOUSE_DOWN,downFNC);
    addChild(figure.circle);
    }
}
function downFNK(evt:MouseEvent):void{
    current_mc=MovieClip(evt.target);
    current_mc.x=mouseX;
    current_mc.y=mouseY;
    stage.addEventListener(Event.ENTER_FRAME,appear); 
}

function appear (evt:Event):void
{
    current_mc=???
    current_mc.x=mouseX;
    current_mc.y=mouseY;
    if(mouseX > stage.width/2)
        current_mc.visible=false;              
    else
        current_mc.visible=true;
    stage.addEventListener(MouseEvent.MOUSE_UP, upFNC);
}
function upFNC(evt:MouseEvent):void
{
    stage.removeEventListener(Event.ENTER_FRAME, appear);
}
  • 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-15T09:48:58+00:00Added an answer on May 15, 2026 at 9:48 am

    I am a little confused. You assign current_mc in your downFNK, so then in your appear function it should still be assigned.

    Also, instead of listening for Event.ENTER_FRAME, you should change it to listen for MouseEvent.MOUSE_MOVE.

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

Sidebar

Related Questions

I am trying to create three concentric circles of different color using GraphicsProgram. However
I am trying to create three tables however I am getting error as You
In this example I create three buttons 'one' 'two' 'three'. When clicked I want
I am trying to create three controls that are layed out horizontally. In an
I'm trying to figure out the best way to create three 284x87 rounded rectangle
I've written the following code to create a three-column layout where the first and
I managed to create a dynamic three dropdown list using Javascript code and it
I want to create two and three dimensional vectors using a constructor in a
I have three problems: I want to create resizable shapes with box bounding... I
I have three models that are coming together to create one view model and

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.