animating a mask using tween class?

  • appleboy
  • Born
  • Born
  • appleboy
  • Posts: 2

Post 3+ Months Ago

it seems i always get to a standstill in flash when i try to make something mask.

the file i'm working on has 5 animated movie clips, what i'm trying to do is make each one a mask and have the masked image reveal more as the movie clips expands. the code to expand and retract is already made and works, until i apply the mask property to the image i'm working with.

here's a snip of the code, i'm new to as3 so it's probably not very concise at all.
Code: [ Select ]
 
box1_mc.addEventListener(MouseEvent.MOUSE_OVER, box1Over);
box1img_mc.mask = box1_mc;
 
function box1Over(event:MouseEvent):void {
    box1_mc.addEventListener(MouseEvent.MOUSE_OUT, box1Out);
    box1_mc.removeEventListener(MouseEvent.MOUSE_OVER, box1Over);
    myLogoTween = new Tween(box1_mc, "width",  Bounce.easeOut, box1_mc.width, box1_mc.width = 220, .5, true);
    myLogoTween = new Tween(box1_mc, "height",  Bounce.easeOut, box1_mc.height, box1_mc.height = 125, .5, true);
}
 
function box1Out(event:MouseEvent):void {
    box1_mc.addEventListener(MouseEvent.MOUSE_OVER, box1Over);
    box1_mc.removeEventListener(MouseEvent.MOUSE_OUT, box1Out);
    myLogoTween = new Tween(box1_mc, "width",  Strong.easeOut, box1_mc.width, box1_mc.width = 160, .5, true);
    myLogoTween = new Tween(box1_mc, "height",  Strong.easeOut, box1_mc.height, box1_mc.height = 65 , .5, true);
}
 
 
  1.  
  2. box1_mc.addEventListener(MouseEvent.MOUSE_OVER, box1Over);
  3. box1img_mc.mask = box1_mc;
  4.  
  5. function box1Over(event:MouseEvent):void {
  6.     box1_mc.addEventListener(MouseEvent.MOUSE_OUT, box1Out);
  7.     box1_mc.removeEventListener(MouseEvent.MOUSE_OVER, box1Over);
  8.     myLogoTween = new Tween(box1_mc, "width",  Bounce.easeOut, box1_mc.width, box1_mc.width = 220, .5, true);
  9.     myLogoTween = new Tween(box1_mc, "height",  Bounce.easeOut, box1_mc.height, box1_mc.height = 125, .5, true);
  10. }
  11.  
  12. function box1Out(event:MouseEvent):void {
  13.     box1_mc.addEventListener(MouseEvent.MOUSE_OVER, box1Over);
  14.     box1_mc.removeEventListener(MouseEvent.MOUSE_OUT, box1Out);
  15.     myLogoTween = new Tween(box1_mc, "width",  Strong.easeOut, box1_mc.width, box1_mc.width = 160, .5, true);
  16.     myLogoTween = new Tween(box1_mc, "height",  Strong.easeOut, box1_mc.height, box1_mc.height = 65 , .5, true);
  17. }
  18.  
  19.  


the swf and fla are here -> http://drop.io/cdnflash


any help would be greatly appreciated, i'm out of ideas
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.