12 Replies Latest reply on Jan 31, 2009 12:56 PM by mentlity

    button on top of mc problem

    mentlity Level 1
      OK I have an mc with tweening movieclips that were ripped from an original page of a project I have to re do. The original was coded differently so I need to drop the mc in the new movie. The fla here is just the mc I'm having a problem with in a simple movie with frames to illustrate what I need to do

      symbol1 is an mc of movieclips, when the animation is done when you press on each clip the color changes and stays until you click the next. This was originally in a an swf that used the clip to display what page you were on, follow?

      OK, that part of the clip works fine but I need to make the clips act as buttons so when you press on each not only does the animation turn blue but it will call an onRelease _root gotoandstop (frame) function which will move the movieclip pages to there proper frames .

      The only way I figured to do was to make an 1 invisible btn , 5 instances of that with 5 different names. Put all the button actions on a frame and that would work.

      Problem is that it does work but the mc clip underneath no longer works.

      If I drag the btn instances off the top of the mc's and test the movie , the original animation works fine.

      So it seems the btn actions stop the mc from running, any way around this as I need both to work.




      SWF url is here


      Fla is here
        • 1. Re: button on top of mc problem
          clbeech Level 3
          hey m - I've gotten a chance to look at your file. part of the issues here are related to 'structure', it's important when you build a file that you construct a solid foundation, using proper naming helps as well for things like your symbols and frame labels - i know you were just putting together a quick demo file here, but it's good practice to use in any situation.

          but anyhoo, one way to go about doing this is to create a different sort of structure within the buttons using frame labels that relate to the 'state' of the 'button' although we are using MCs to act as buttons. I've also used AS to a)store list of buttons instance, b)assign the button handlers, c)control the state of the buttons, d)navigate to the pages the buttons represent, e)animated the buttons slide in at the beginning - all operational code is found on the first frame of the main timeline - I've also set up the proper labels and structure to achieve something like this, although you may want things to be slightly different - it should give you an idea of how to organize this a bit better so that it will function. certainly there are other methods to achieve this as well, but these are pretty solid - and will solve the issues you are having.

          here's the Flash8 FLA FILE
          • 2. Re: button on top of mc problem
            mentlity Level 1
            Thx 4 the reply, I tried to open the file and it is damamged. can you re post a new one?

            RD
            • 3. button on top of mc problem
              mentlity Level 1
              Sorry for the double post.

              Thx 4 the reply, I tried to open the file and it is damaged. can you re post a new one?

              RD
              • 4. Re: button on top of mc problem
                clbeech Level 3
                sorry about that - had to bring it over to the mac to get the compression right... what's new! lol!

                same file address, try the link again.
                • 5. Re: button on top of mc problem
                  robdillon Most Valuable Participant
                  The button clips have instance names and seem to work correctly. The movieClips that contain the section names do not have instance names. I cannot find any code that tells these clips to play or to go a frame in its timeline. If you name these clips then you can animate them to coordinate with the buttons in the other clip.
                  • 6. Re: button on top of mc problem
                    clbeech Level 3
                    Rob - did you not see that i have spent some time on this? and there are far more problems with the file than that - did you review the file I'd constructed as an example? or how about bother to read my post?
                    • 7. Re: button on top of mc problem
                      mentlity Level 1
                      Thank you very much for this code as I see you are using arrays which brings me to brushing up on AS 2.0 a bit more but doing sites on deadlines limits my time.
                      • 8. Re: button on top of mc problem
                        robdillon Most Valuable Participant
                        Beech,
                        If you look at the post times you'll see that we both posted at approximately the same time. No, I did not read your file before I posted because it wasn't there. Yes, I know that there are many problems with the original file.

                        You might want to park the 'tude.
                        • 9. Re: button on top of mc problem
                          clbeech Level 3
                          Hey Rob - sorry man, really. I wasn't having a great day at the time and it just struck me wrong - I'd spent a pretty fair amount of time rebuilding an example file. and I'm sure that you had spent a good amount of time just reviewing it. it's easy to understand that in the time you spent do so, that when you came to an analysis and posted - in the interim i could have completed my post with you knowing. it *does* happen all the time, i can't count the number of times that I've been typing away on some code and kg posts 3 times before I'm done LOL! so again, sorry dude - didn't really mean to bark at you.
                          • 10. Re: button on top of mc problem
                            robdillon Most Valuable Participant
                            Not a problem. It looks like you got the problem sorted out and that's why we're all here.
                            • 11. Re: button on top of mc problem
                              mentlity Level 1
                              Again, thx for the fla. I studied it and going over some AS 2.0 its a bit clearer now. My last dilemma is getting all of the fla into a movieclip. To do this I see the framelabels, GoToAndStop's will have to be changed to _root am I right? I'm including a link to the fla it has to go in. You did enough work for me so please don't add to the fla I'm sending. But if you can, just re write the AS so the fla you did is a movieclip and it can sit in the fla I have in the attached.
                              People like you are a blessing to people like me and your willingness to do all that code was really thoughtful so last thing with just instructions on what lines to change in the AS would be great.

                              the fla in the attached was put together from an unfinished project that someone else did, you will see it is quite heavy and the AS inside is from two separate builds. But it works.

                              Fla Is Here

                              RD
                              • 12. button on top of mc problem
                                mentlity Level 1
                                To Beech, I was able to figure a way to fix all this, so I took down the fla and I'm on my merry way thx to you.

                                RD