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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:45:21+00:00 2026-05-28T14:45:21+00:00

I have created a movieclip which have 120 frames. Now i have used multiple

  • 0

I have created a movieclip which have 120 frames.

Now i have used multiple instances of this movieclip on stage.

I want each movieclip to stop when it reaches a particular frame. (frame number is different for all instances)

i tried following code

if (char_1.currentFrame == 36) {char_1.stop();}

but it’s not working. i tried to trace the current frame and it’s always showing 1.

trace(char_1.currentFrame);

Any solution please?

  • 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-28T14:45:22+00:00Added an answer on May 28, 2026 at 2:45 pm

    try something like this:

    // root
    var allMCs:Dictionary = new Dictionary();
    allMCs[char_1] = 32;  // frame on which to stop char_1
    allMCs[char_2] = 12;  // frame on which to stop char_2
    allMCs[char_3] = 47;  // frame on which to stop char_3
    // ... add more
    
    // add ENTER_FRAME listener
    this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
    
    function onEnterFrame(evt:Event):void
    {
        // loop through all MCs and check their frame
        for (var mc:MovieClip in allMCs)
        {
            trace(mc + " frame: " + mc.currentFrame);
            if (mc.currentFrame == allMCs[mc])
            {
                mc.stop();
            }
        }
    }
    

    if the traces still state that the currentFrame is 1, make sure to do a play(); in every MC you use.

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

Sidebar

Related Questions

I have created a currency fomatter class. I want this to be a util
I have created a service which displays a status bar notification after certain time
I have two MovieClip symbols in my library and I want them to share
I have a movieclip wich has a simple movement of a simple shape. This
I am trying to create to movable instances, that are draggable, and which have
Flash's MovieClip timeline is created in such way that can skip frames to preserve
I'm making a flash quiz which will have a series of questions. Each question
So I duplicate a MovieClip that is on the Stage and created through the
I have MovieClip, created with CS5. Is there a way to hide (set visible
Let's say I have a resource file which exports mc1 with 4 frames 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.