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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:07:32+00:00 2026-05-30T07:07:32+00:00

I asked before with a similar problem and received a great answer, so I

  • 0

I asked before with a similar problem and received a great answer, so I apologise if this is a little frustrating. Hopefully it will be a quick one. I’m designing an interactive Flash tutorial in an effort to explain a complex biological problem, and I have structured the Timeline so that there are no more than two frames and four layers. I designed this before on the Stage timeline but it became so messy, and with a few problems, that I decided I had to redo it this way.

It consist of three main parts – A title that fades in first in two segments, followed by two buttons (that are disabled until they fully fade in) and finally animations of molecules that fade in and out indefinitely on a loop. The page then stays ambient until a user clicks one of the buttons.

I have four layers on the main timeline – Actions, Buttons, Molecules and Titles. In each are the relevant images and animations.

I want to code it so that each plays successively after the other, but I’m having real difficult accessing other timelines through AS3.

Currently I have this in the Actions layer:

import flash.events.Event;

NRPSText_mc.addEventListener(Event.ENTER_FRAME, FadeIn);

function FadeIn(event:Event):void
{
    if (MovieClip(this.root).currentFrame > 0) {
        NRPSText_mc.gotoAndPlay("NRPSFadeIn")
    }
}

ColourButton_mc.addEventListener(Event.ENTER_FRAME, BtnFadeIn);

function BtnFadeIn(event:Event):void
{
    if (NRPSText_mc.currentFrame == 30) {
        ColourButton_mc.gotoAndPlay("ButtonPress")
    }
}

It should be clear from this that I’ve labelled certain events in each timeline, and I want them to play as one finishes.

The problem is knowing what to put before “.currentFrame” in each instance, and I can’t find it anywhere! Until now I have been able to get by using “this” and “MovieClip(this.root)”, but I need to be able to find out how to references these embedded timelines to make it work. I’ve tried these codes with “trace” and it seems to work fine, so I assume this is where the problem lies.

  • 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-30T07:07:33+00:00Added an answer on May 30, 2026 at 7:07 am

    First of all if you have code on main timeline instead of MovieClip(this.root).currentFrame you can just use currentFrame since you are refering to the object you set the script on.

    Second, this

    if (MovieClip(this.root).currentFrame > 0) {
        NRPSText_mc.gotoAndPlay("NRPSFadeIn")
    }
    

    will just make NRPSText_mc stay at “NRPSFadeIn” label since called each frame.

    Third, if you have a movieclip on stage and you have set its instance name you can reference its timeline FROM parent scope (main timeline) by that instance name as you do with NRPSText_mc.gotoAndPlay("NRPSFadeIn"). If you got a script INSIDE that movieclip just use gotoAndPlay() and currentFrame because you are in the same object as a script.

    Also you are doing it a bit wrong. Common approach is to use timeline animation or some kind of a tweening library like TweenMax. As you are using Flash IDE the proper way of doing same thing would be the following: create separate movieclips with whatever animation for your objects you want; place them on main timeline which got its own animation involving these clips; on whatever frame you want to control your inner clips set separate scripts with stop(), gotoAndPlay(), etc.

    If you want to be notified when a clip finished playing use AS3 events. For example you got a movieclip named mc, add a script to the last frame dispatchEvent(new Event("stopped!")); stop(); and at main timeline

    mc.addEventListener("stopped!", listener);
    function listener(event:Event):void {
      trace("mc stopped!");
    }
    

    This way it is much easier than checking for frame numbers every enterframe event.

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

Sidebar

Related Questions

Question 828421 asked similar question, but received only one real answer (update rubygems) and
I know this question has been asked before, but I ran into a problem.
I know this one has been asked before, however I can't seem to find
I know similar questions have been asked before, but I can't find one that
I got a good answer before for a similar problem but I didnt consider
First off - apologies if this or a similar question has been asked before.
I've asked a very similar question before, but this time is not about VB
I've asked a similar question before, but I've done some more research and this
OK, I had asked a similar question before and had got an answer but
Just asked a question pretty similar to this one... Currently I am doing a

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.