7 Replies Latest reply on Aug 27, 2007 8:19 AM by Mr. Aztek

    GAH! {bangs head on wall}

    Mr. Aztek
      I apologize for the amateur hour below, but appreciate any help. Long story short:
      I have a movieclip(mcCategory1) that scales up and down during onRollOver/Out. Within that movie clip is another movie clip which is meant to slide down as if opening a drawer (mcDrawer) as mcCategory1 scales up and then slide back as mcCategory1 scales back to its original size; during a roll over and out, respectively

      The kicker? If I put the twSlideDown/Up into the symbol's timeline, the sliding efffect works when tested and placed on the stage. But when I apply the twScaleUp/Down to the instance (as shown below), the scale will work, but the mcDrawer stays put. So I move all the functions, etc. to what's shown below, only to have the same effect (scale, no slide)

      What on earth is this amateur doing wrong? Thanks!
        • 1. Re: GAH! {bangs head on wall}
          clbeech Level 3
          How about put the drawer slide function into the first handlers, (also you should try not to name tweens the same) something like:
          • 2. Re: GAH! {bangs head on wall}
            Damon Edwards Level 3
            you must be careful with the formatting. since you have var tween1x : Tween, there is a space in there and when calling the onMotionFinished event, it will be wanting the space in there too
            • 3. GAH! {bangs head on wall}
              Mr. Aztek Level 1
              Thanks so much to the both of you for the assist. Now my head doesn't hurt...as much.

              I'm still encountering an issue where mcCategory1 does not scale back down on RollOut.
              The drawer doesn't slide all the way back up behind mcCategory1 on RollOut, instead it bounces back down, but I'm sure it will just require me fiddling with the _y values a bit for the slide.

              If it helps any to visualize the spatial realations in mcCategory1, here are the dimensions/position of each element contained therein:
              shape in "button" layer: w=100 h= 20, x= -50 y= -10
              mcDrawer in masked "drawer" layer: w=92.8 h=31.1; x= -45.9 y= -18.9
              • 4. Re: GAH! {bangs head on wall}
                clbeech Level 3
                definitely dz, I didn't see that there. It might be that if you rollOut while the onMotionFinished is still firing and is still looking for a completion and vise-versa, it does run then(?) that's an interesting question @dz: what happens when we interupt one tween, and move to another with calls like this (never really thought about it) ? But you should be able to run all of them at once anyway, considering the MC set up you have:
                • 5. GAH! {bangs head on wall}
                  Mr. Aztek Level 1
                  Thanks a million to the both of you, it seems to work now, and all it needed was to swap out the this._y values (the drawer was sliding the wrong direction). I have to have 30+ of these symbols appear in this SWF file, so I'll keep the spacing in mind to avoid possible instance overlaps. I'll try this when I get back into the office on Monday and give a final prognosis.
                  • 6. Re: GAH! {bangs head on wall}
                    clbeech Level 3
                    No problem Mr.A, you're welcome, glad that you were able to get it working.
                    • 7. Re: GAH! {bangs head on wall}
                      Mr. Aztek Level 1
                      Final Prognosis:

                      With 30 instances of this symbol, it works 97% flawlessly without any overlap (thankfully). The remaining 3% stems from a little jitteryness when the movieclip is rolled over slowly, as it looks like AS is getting a little unsure of what the mouse movement is doing and goes back and forth between the two functions. Nonetheless this was a big help. Thanks to the contributors!

                      Now all I have to work out is now to get each instance to pull different text into the same dynamic text field...