Mask Animation Problem

Hi guys,
I’m trying to add a mask animation on a movieclip that i have in the library. The problem is that my code add the image to the movieclip that i have created to contain the image but his mask doesn’t animate.
So i have:

  • the mask layer
    – a layer for the image
  • a layer for the movielip background
    in this order. With greensock i add a scale animation to the mask layer on the mouseover event but it doesn’t animate.

This is the code. I’ve also attached the original files…
Please guys help me!!! :wink:


import com.greensock.*;
import com.greensock.easing.*;
var columns:Number;
var my_x:Number;
var my_y:Number;
var my_thumb_width:Number;
var my_thumb_height:Number;
var my_images:XMLList;
var my_total:Number;
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("press_room.xml"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);
var container_mc:MovieClip;
var x_counter:Number = 0;
var y_counter:Number = 0;
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
var MainMovie:thumbnailholder = new thumbnailholder();
mainCont.x = (stage.stageWidth / 2) - 200;
mainCont.y = stage.stageHeight / 2;

function processXML (e:Event):void{
    var myXML:XML = new XML(e.target.data);
    columns = myXML.@COLONNE;
    my_x = myXML.@XPOSITION;
    my_y = myXML.@YPOSITION;
    my_thumb_width = myXML.@WIDTH;
    my_thumb_height = myXML.@HEIGHT;
    my_images = myXML.IMAGE;
    my_total = my_images.length();
    
    testMovieClip();
}

function testMovieClip():void{
    for (var i:Number = 0; i < my_total; i++){
        var thumb_url = my_images*.@ANTEPRIME;
        var thumb_loader = new Loader();
        thumb_loader.load(new URLRequest(thumb_url));
        MainMovie = new thumbnailholder();
        MainMovie.x = (MainMovie.width + 70)*x_counter;
        MainMovie.y = (MainMovie.height + 70)*y_counter;
        if (x_counter+1 < columns){
            x_counter++;
        } else {
            x_counter = 0;
            y_counter++;
        }
        mainCont.addChild(MainMovie);
        MainMovie.imgMain.addChild(thumb_loader);
        MainMovie.contImg.addEventListener(MouseEvent.MOUSE_OVER, msov);
        MainMovie.contImg.addEventListener(MouseEvent.MOUSE_OUT, msot);
    }
}

function msov(e:MouseEvent)
{
    TweenMax.to(e.target, 1, {scaleX:1.2, scaleY:1.2,  ease:Elastic.easeOut});
}
function msot(e:MouseEvent)
{
    TweenMax.to(e.target, 1, {scaleX:1, scaleY:1,  ease:Elastic.easeOut});
}

EDIT:
The mask layer is: contImg
The image layer is: imgMain