Checking to see if something has started

Ok here is my question/problem.

I have 6 buttons up the right side of my movie. I also have 6 movies sitting on the main stage - all named Page1, Page2, ect.

What I would like to do is when you click on say Page3, ask it to see if the movies for pages 1, 2, 4, 5 or 6 are on a certain frame, and if so - tell them to play another frame in their respective timeline.

My reason for this is to show a transition. Like page1 comes in nice, then if i click page4 I would like page1’s exit transition to play and then page4 to start playing.

Do you guys know what I could do here? Do you have any idea as to what I am talking about ?:slight_smile: Thanks in advance!

_root.path.currentFrame

ok - thanks MLK

now could you explain that a little more :slight_smile: I am not exactly a brainiac when it comes to AS. Do I need an if statment or something…?

never mind I figured it out… pretty cool really. I guess I should mess around with AS a little more. Thanks for pointing me in the right direction!

Hi sureshot I´m not familiar with that code could you explain what you figured out?

well the thing is - I thought it was figured out but I was wrong.

When ever I try and make a button check and see if a movie is on a certain frame and if it is, go to a play another frame it works - but it works everytime. Even if the movie is not on the frame it suspposed to - it still goes to that one and plays. I will post my code here and someone please tell me what I am doing wrong!!

on (release) {
    if (bundle_currentframe = 30) {
        bundle.gotoAndPlay(31);
    }
}
on (release) {
    if (page1_currentframe = 1) {
        page1.gotoAndPlay(2);
    }
    if (page2_currentframe = 50) {
        page2.gotoAndPlay(51);
    }
}

Page1, Page2 and Bundle are all seperate movie clips that I am trying to find the postion of and make them play if they need to.

Can anyone help?

Gessh guys - no ones going to help me! :slight_smile:

Actually, I just figured it out!!! Here is the code for it.

on (release) {
    if (bundle._currentframe == 30) {
        bundle.gotoAndPlay(31);
    }
    if (page1._currentframe == 1) {
        page1.gotoAndPlay(2);
    }
    if (page2._currentframe == 50) {
        page2.gotoAndPlay(51);
    }
    if (page3._currentframe == 50) {
        page3.gotoAndPlay(51);
    }
    if (page4._currentframe == 50) {
        page4.gotoAndPlay(51);
    }
    if (page5._currentframe == 50) {
        page5.gotoAndPlay(51);
    }
    if (page6._currentframe == 50) {
        page6.gotoAndPlay(51);
    }
}

What I was doing wrong was I didnt put a “.” before the “_currentframe” and I also didnt have a “==”

Maybe a stupid mistake to most of you but very easy to miss if you arent an AS guru - like me :beam:

Well I never tried to do the transition that way. I use variables instead. But if your not locked on the idea of controlling the movie with the currenframe comand you could try this.

For example on the page 1 button
[AS]
on (release) {
nextFrame();
navigation = “page1”;
}

And then have navigation change value to page2 for that button on so on.
{[/AS]

In the end of the page1 part of the timeline have
[AS]if ( navigation == “page1”) {
gotoAndPlay (“page1”);
}
else if ( navigation ==“page2”) {
gotoAndPlay (“page2”);
}
{[/AS]

I´m definately not on expert on AS and this code is not tested so I´m not sure it will work but it should in teory anyway, but I alway have trouble with the nextFrame (); comand but that is replacable with the gotoAndPlay (framenumber); instead.

Hope that will help

Doh you already solved it! Was a bit to late there :wink:

thanks for the help anyway man :slight_smile:

Even though I Can’t really figure out what you mean, I am sure it would have worked just as well :wink: