FLASH MX Best answer on the web

January 9, 2009 on 7:21 am | In mybachcars.com |
FLASH MX Best answer on the web
  • I would like to know, when using FLASH MX how I can stop a certain layer without stopping the rest of the layers. For example I want to have a curtain open when the page displays and then I want it to stay open and never close untill they enter the site again while the inside is changing pictures. I don't know how to do this but I have tried everything. Please respond with great detail so that I can understand you step-by-step instructions. Thank You!!


  • Thank you for the quick responce,
    I appriciate that you are trying to help me. I am sorry that I could not make my question clear. I would like to give you an example so you can see what I am trying to say. Could you please visit the website www.tctalent.com and I would like for you to look at the banner. As you can see the letters TCT pop up along with the buttons on the bottom. If you keep looking the TCT and the buttons stay without looping while the pictures behind the TCT change and keep looping. The thing I can't do is that every time I want TCT to stay and never loop while the pictures behind it change, it always loops and the TCT would pop up again and again forever. I want the TCT to stay and not pop up again while the inside loops forever.


  • Hi,

    I'm not sure how far into detail we are going to have to go here, but I'm willing to work with you on this.
    What you are looking for is the Movie Clip object. Your main "stage" (the base movie is normally referred to as the main stage) will probably be blank. The other things going on are going to be Movie Clip objects.
    What it sounds like you are trying to do has been able to be done since Version 4, so there are several step by step instructions for doing this. I'm going give you some links to some tutorials here in a minute, but will also help explain them if you are still having some trouble with those examples.
    You can do this through the interface, or using ActionScript. From the wording of your question, ActionScript may be more confusing than necessary, unless you have done some programming in another language. Personally I got the ActionScript methods far sooner than I got the interface methods.
    So, we want a curtain to pull back and a small puppet show to happen, until the user enters the site by clicking a button, and then the curtain will drop again and the site will open.
    Once you get the Movie Clip object down, several cool things open up for you. The first hint is that with most cool Flash programs the main stage will have nothing permanent on it. If you keep that in mind and build everything as instances of Movie clips, the idea of what needs to be done starts sinking in.
    http://www.kirupa.com/developer/mx/fire.htm

    http://www.kirupa.com/developer/mx/snow.htm

    http://www.kirupa.com/developer/mx/cartoon.htm

    Those three tutorials, deal with movie clips. If you can get those three down and understand what is going on, or even just get to the point where you can re-create them yourself, then your curtain project is going to be very simple for you.
    Now I understand that you might have some specific areas that you don't quite get the meaning of, and as I said I'm willing to help you smooth over those spots once you get into these three tutorials. Once you get to Dexter, in the third tutorial, you'll have it all down smooth.
    Your project, just from the small description you gave is going to have
    1) a blank stage

    2) two movie clips, one for each curtain, if those are being pulled to the side, or one curtain movie clip if it goes up.
    3) a button object, saying enter. This button will be inside another movie clip.
    4) the display movie clip, which will do (I don't know what that does, but if you explain a little about it, maybe I can give you a fast inventory) We'll call this one the dance.
    I'm only listing this so you will have it in your head while you are doing those three tutorials. So, start there and let me know, using the Request Clarification button, what you don't understand and I'll try to explain it further. They are good tutorials though, so I don't expect you will need much help.
    webadept-ga


  • Hi again,

    Well, as I said, this is a matter of Movie Clips. If you go through the third lesson I linked to above, the one with Dexter, you will find your answer. Pay attention to the part about Dexter's eyes. They blink at regular intervals, but are on a seperate time than say his mouth or arms. Watch Dexter for a while and you will see that the blinking happens seperate from everything else.
    In the example banner you linked to, in order to create this, I would have 4 movie clips.
    The top menu, bottom menu, the TCT logo and the rotating images in the back ground.
    The TCT logo Movie Clip, would come on stage at the start, use a motion twain to get where it is going (inside the movie clip timeline, not in the main stage timeline) and use the stop(); command to place it there without looping.
    The background pictures would be setup on a looping Movie Clip. All this means is that there isn't a stop(); funtion set at the end of this Movie Clip's timeline.
    When you place a Movie Clip on the stage, it will continue to play until it is told to stop();, or, you move past the point this Movie clip exists.
    Dexter's main stage has only one frame of timeline. His whole body is made of seperate movie clips which make up his arms, eyes, mouth and body. Each moving, or not moving as the case may be, according to their particular programming.
    As a small experiement with Dexter, open up that movie fla file, the one they let you download.
    First Double Click on Dexter to open up his top movie clips. This will show the several layers of Dexter labeled Head, R Arm, Body, Legs, L Arm.
    Move the timeline marker out to frame 35, where the Head movie clips is shown. You will see the blue box show up around the head. Double click on the head to open up the movie clip layer there.
    Now we see the eye movie clip in a blue rectangle.. double click on the eyes.
    Now move out to frame 50 for the eye movie clip. ( the last frame) Here we are going to stop the eyes from blinking, after they blink the first time, but we are going to let the rest of Dexter move as he normally would.
    Right click on frame 50 and choose Actions.

    type in : stop();

    or choose it off the menu.

    now, press Ctrl-Enter, and see that Dexter's eyes will blink once, but then remain open from that point on, but each of his other parts continue to move as they did originally.
    This is the same thing you will do with any movie clip you wish to show up, do something, then remain where it is.