7 Replies Latest reply on Feb 21, 2009 1:47 PM by Ned Murphy

    loosing button function on loaded movieClip!!!

    MartinItsMartin Level 1
      Hi all/anyone/everyone,

      I have a movieClip with onRollOver, rollOut, release functions attached to it. it loads in a movieClip with buttons, but I cant access the buttons.... I've been ticking over this for a week now... and I dont know how to get around it?? HELP... I'm sure I'm missing something hugely obvious. Please educate me!

      Thanks in advance,
      Martin
        • 1. Re: loosing button function on loaded movieClip!!!
          Ned Murphy Adobe Community Professional & MVP
          If the movieclip has mouse-related code, it will block anything inside it. What are you trying to accomplish? There may be another approach.
          • 2. Re: loosing button function on loaded movieClip!!!
            MartinItsMartin Level 1
            HI Ned,

            thanks for the reply. I really thought I was missing something.

            I have a movieClip that takes up a quarter of the stage (Actually there 4... each quarter) onRelease it covers the full stage, I want the content to load within, but it needs btns.

            In the first movieClip I am tweening a mask as there is an image as background and when this is closed I want it to mask the content.

            But it seems I will have to rethink how to do this... but I'm blank at the moment.
            • 3. Re: loosing button function on loaded movieClip!!!
              Ned Murphy Adobe Community Professional & MVP
              I'm not clear on what you have there, but one solution to consider is to have a background element in the movieclip that manages the mouse-related activities of the movieclip rather than the movieclip itself. That way, the buttons could be atop that background layer and be fully accessible. That background layer could be a rectangle mc with its alpha set to 0, or an invisible button.
              • 4. Re: loosing button function on loaded movieClip!!!
                MartinItsMartin Level 1
                Hi Ned,

                I just put up a tester for you to see where I'm trying to get to...

                http://www.youthebiscuit.com/client/MoniqueLaramee/index.html

                Please be patient, theres no loaders... its really bare bones. Its just the top right square that loads anything at the moment.

                here's a snippet of code... its a mask I'm tweening///

                function roll() {
                TweenLite.to(this.mask01, 1, {_xscale:96, _yscale:96});
                this._alpha =100;
                }
                squares_mc.im1.onRollOver = roll;
                squares_mc.im1.onRelease = function() {
                TweenLite.to(squares_mc.im1.mask01, 2, {_x:208, _y:158,_xscale:205, _yscale:206});
                this._alpha =100;
                d += 2;
                squares_mc.im1.swapDepths(d);
                loadMovie("domRep.swf", "squares_mc.im1.content");

                }
                squares_mc.im1.onRollOut = function() {
                TweenLite.to(squares_mc.im1.mask01, 1, {_x:0, _y:0, _xscale:100, _yscale:100});
                TweenLite.to(squares_mc.im1, 2, {_alpha:50});
                }

                I hope this makes it clearer for you. If I use an invis mc behind the movie clip it wont recognise a rollOver function! But I know what you mean. BTW appreciate you inpiut... really !!
                Thanks
                Martin

                • 5. loosing button function on loaded movieClip!!!
                  Ned Murphy Adobe Community Professional & MVP
                  I'm not talking about being behind the movieclip. I'm talking about within the movieclip, but on a layer that would be below whatever layer into which you would load the remaining content.

                  In any case, you'd also need any contained mouseable elements to share some control of the mask to prevent a rollover onto them from triggering a rollout event for the mask--much the same as a drop down menu scenario.
                  • 6. Re: loosing button function on loaded movieClip!!!
                    MartinItsMartin Level 1
                    Hey ned,

                    thanks for the input, yeah now I have the rollOut problem when rolling over the loaded btn. Do you mean that the loaded btn should control the parent mask? Would this override the parent function? or am I misunderstanding.

                    I'll play around again.

                    Thanks alot Ned, its been great having another input on this. Working solo is hard sometimes...

                    Cheer,
                    Martin

                    • 7. Re: loosing button function on loaded movieClip!!!
                      Ned Murphy Adobe Community Professional & MVP
                      Yeah, whatever rollover stuff the main area does to keep the mask fully extended is what the things inside the area would also have to do. You might be able to use a bit of logic (true/false) on the mask function that prohibits it folding back. The inner buttons could set that value to the same value that the movie does, so that only a rollout off the outer borders of the main area (which sets that value to allow closure) would result in the closure (mask reduction).