[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 683
  • Last Modified:

Movie clip frame to refresh frame outside movie clip.

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:

stop();
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?
0
coolcollin
Asked:
coolcollin
  • 2
1 Solution
 
SamuelRostolCommented:
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:
_parent.doAction();

Could that work for your project?
0
 
coolcollinAuthor Commented:
perfect. exactly what i was looking for. thanks!
0
 
SamuelRostolCommented:
You're welcome :)
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now