Jump to content
Search Community

cach

Members
  • Posts

    3
  • Joined

  • Last visited

cach's Achievements

0

Reputation

  1. Thanks for your help carl In case someone is curious, you can get stage coordinates with something like: var globalClipPosX:Number = (e.target as DisplayObject).localToGlobal(new Point()).x ; Using that I managed to get the position I wanted. I hit another snag however (hopefully is the last). Once the user zooms in on the card, they can press a button to cancel the Zoom and the card goes back into place, that works ok. Except if the user has the mouse over the card, or quickly points to other card in the hand (this triggers the highlight-enlarge tween) and that messes everything up. I tried to use overwrite and/or killAllTweensOf in several different ways, but can't seem to get rid of this behaviour.
  2. Thank you both! I managed to solve my problem. This leads into another problem however. You see, what I'm trying to do is a small card game. I have a movieclip on the stage called "hand" and that clip is made out of 8 smaller "card" clips. When I click on a "card" I want it to move to the center of the stage and get larger, the problem is that when I use Tweenmax to move the "card", it goes to the center of the "hand" and not to the center of the stage. I guess I could try to calculate the real stage coordinates to position the card just right, but I was wondering if TweenMax can make this easier somehow. Ah, I forgot to mention that "hand" is scaled down to 25% its original size, that makes things a little harder.
  3. Hey, a TweenMax/Flash newb here. I am working on a menu where when you mouse over on a MovieClip, it enlarges and gets highlighted, it works fine except that the stretching is always "anchored" on the center, and I need the clip to grow from the lower-left corner. I don't know if this is something that must be coded or somehow set up on the flash IDE. Anyways, here is the "enlarge" code: function EnlargeCard (e:MouseEvent):void { trace("In- "+e.target.name); var currentMC:MovieClip = MovieClip(e.target); TweenMax.to(currentMC, .8, {scaleY:2, ease:Back.easeOut}); //highlight! TweenMax.to(currentMC, .3, {colorMatrixFilter:{saturation:1, brightness:1}}); TweenMax.to(currentMC, 1, {glowFilter:{color:0xffff00, alpha:1, blurX:10, blurY:10}}); }
×
×
  • Create New...