"if" & "else" problem

Hi, I have some problem with a website that I am trying to make…

On this website, I have 2 movieclips. First one called “elearning” and second one called “website” (I mean the istances names).

Each of this movie clip runs trough an animation of 20 frames splitted in 2 parts. So it starts from frame 1 and stops at frame 10. Than a button will command it to run trough frames 10 to 20.

What I want to achieve is that if one of the two clips is on frame 10, than the button should command one clip to go from 1 to 10 end the first one from 10 to 20.

To explain better, this clips, appear on the stage on frames 1 to 10 and disappear from 10 to 20.

So lets say you click on the fake button of elearning.
It will command the elearning movie clip to show up.

Than you click on website. This button should command the elearning clip to disappear ( and so to go from frame 10 to 20) and at the same time it should command the website clip to appear on the stage.

But if the elearning clip is already hidden, it should stay hidden.

I have tried to write this piece of code but it does not work. Cause when I click on the website movie, it will command the elearning clip to go from 10 to 20 anyway, and it does not check if the elearning clip is hidden or shown.

on (press) {
	_root.website.gotoAndPlay ("start");

on (release) {
	if (_root.elearning._currentframe = 20){
	_root.elearning.gotoAndPlay ("stop");
} else {
	if (_root.elearning._currentframe = 1) {


I would be glad if anyone could help me, thanks. :trout: