Movie clip frame to refresh frame outside movie clip.

Posted on 2007-07-23
Last Modified: 2012-06-27
I'm working on a script that will only display text when a password is typed in. I need the password box to appear on all frames and work independently of the main movie so that you can enter the password without it going to an entirely new frame every time. So i have all the code in a Movie clip. So far, that much works, and when the correct password is entered, it stores the boolean value true in the variable passed. In the main page, I have code on the frame to display the content:

if (passed == true) {textbox.text = "Content!";} else {textbox.text = " ";}

The problem is, the frame doesn't refresh when the password is entered because it is inside a movie clip inside the frame. So when frame 3 is reached inside the movie clip, i need the frame outside of the movie clip to refresh automatically so that the code in the frame is run. Does this make any sense to anyone at all?
Question by:coolcollin
    LVL 12

    Accepted Solution

    You can put the code into a function, and on frame three call the function...

    on the frame outside of the mc:
    function doAction() {
      // all the code here

    on frame 3 of the mc:

    Could that work for your project?

    Author Comment

    perfect. exactly what i was looking for. thanks!
    LVL 12

    Expert Comment

    You're welcome :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
    This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
    The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
    The goal of the tutorial is to teach the user how to how to record live broadcast.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now