5 Replies Latest reply on Oct 5, 2006 8:38 AM by MichelleTen

    multiple actions?

    MichelleTen Level 1
      Hi. I'm not sure that I'll be able to explain this, but I'll try. Here is the site so that you can see what's going on: http://www.enten.com/E&A-324_EntenWeb/portfolio.html

      Ok. So if you click on the next and back buttons (by the hat) a movie clip occurs. The way I have it set up though I think is super bad. At the moment it only goes through two images, but there will be many more. There will also be numbers under the images to click through images in that particular group (they aren't there yet). I have it so that each time you click on a button it goes to a new frame where there is a movie clip with those particular images involved. However, when I add about 10 more images it is going to be a pain to make a movie clip for every single possible option to click on and it will take up more frames and space. What I am getting to here is, is there a way for me to make multiple movies in different frames work on the same button click. For instance when you click, it will first fade and swipe away the first image and then move to the frame that the second clip is on and fade it in? Then I would only need two movie clips for each images instead of a million different movie for every possible option. So I'm going to guarantee that this makes no sense to you, but I thought I'd give it a shot. See I'm a designer and happen to know barely anything at all about the actionscripting, but am trying to learn. So any suggestions would be great. Thanks in advance.
        • 1. Re: multiple actions?
          MichelleTen Level 1
          Ok. So I am getting closer, but still need help. Maybe this will help you to understand. I now have this actionscript on my button:

          on (press) {
          attachMovie ("movie1_clip");
          play();
          attachMovie ("Symbol_1");
          play();
          }

          I have also tried:

          on (press) {
          attachMovie ("movie1_clip" + "Symbol_1");
          play();
          }


          But there is still a problem. Now it is attaching the movie clips to the button, but I click on the button once, and it plays the first clip, and then I click on the button a second time and it plays the second clip, I need it so I clip on the button and it plays one clip directly after the other. Any help?
          • 2. Re: multiple actions?
            aniebel Level 2
            By putting the attachMovie inside the button event handler, you will attach it to the button. You need to tell it where to attach it so your code would be something more like:

            on (press) {
            this._parent.movie1_clip.attachMovie("Symbol_1", "symbol1_mc", 99);
            }

            Read up on attachMovie as you need to specify what's being attached, what the instance name you are giving it and what level it should be on.

            Try keeping your event handlers on the main timeline. You may wan to read David Stiller's recommendations on "why" to do it this way here.

            If you haven't already done so, give your button an instance name of something like "my_btn" If your instance called "movie1_clip" is on the main timeline also, and you have a library symbol called "Symbol_1" then you can use the code below.

            On the main timeline in a frame where the button exists, put this:

            my_btn.onPress = function(){
            this._parent.movie1_clip.attachMovie("Symbol_1", "symbol1_mc", 99);
            };
            • 3. Re: multiple actions?
              MichelleTen Level 1
              Thanks for the advice and I will definately look into that, but my example names may not have been clear. Sorry I just threw together a small demo. "Symbol_1" and "Movie1_clip" are both movie clips. I know symbol is a really bad name for it. Sorry again. But from what I see that you wrote, you only included one movie clip and I need both to play one right after they other. I know it's my fault, really bad example name. Sorry again.
              • 4. Re: multiple actions?
                aniebel Level 2
                Sorry, I didn't read your original post. Just the most recent one. My bad! Sounds like you are looking for a gallery-type function. I found the examples on kirupa.com most helpful for this. Unfortunately, there's a bit more involved than what you have done thus far. If you're up for it, check it out:
                http://kirupa.com/developer/mx2004/xml_flash_photogallery.htm
                • 5. Re: multiple actions?
                  MichelleTen Level 1
                  Thanks. I'll take a look into it.