Masking Problem

hi i am a beginner AS3 coder and

this is what i made for banners for my church.

there is a Box class exported from a created movieclip insida flash its a just white square i used to make a boxes for the mask.

it seems working fine but problem is, sometimes the mask animation stops in the middle of the tweening. it doesnt happen alot but happens sometimes. im wondering whats the problem with my coding and how to solve it. thank you

ps. also, if you can find wether my coding is adding unneeded childs as the time goes on because i just noticed after leaving the banner for more than 4-5 min, it gets extremely slow, i guess there is something thats keep being added and not being removed or replaced. if you can find it please let me know thank you.

import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
var myLoader:Loader;
var myRequest:URLRequest;
var myContainer:MovieClip;
var box:MovieClip;
var boxCon:MovieClip;
var ranNum:Number;
var time:uint = 5;
var imageMax:uint = 4;
var imageCur:int = 1;
function createBox():void{
    boxCon = new MovieClip();    
    myLoader.mask = boxCon;
    for(var i:Number=0; i<5; i++){
        for(var h:Number=0; h<5; h++){
            box = new Box();
            box.x = box.width/2+(i*box.width);
            box.y = box.height/2+(h*box.height);
            var boxTween1:Tween = new Tween(box, "scaleX", Regular.easeOut, 0, 1, ranNum*1, true); 
            var boxTween2:Tween = new Tween(box, "scaleY", Regular.easeOut, 0, 1, ranNum*1, true);    
            ranNum = Math.random();
function onTimer(event:TimerEvent):void{
function nextImage():void{
    myRequest = new URLRequest("data/banner/image"+imageCur+".jpg");
    myLoader.load(myRequest); = String(imageCur);
    if (imageCur == imageMax){
        imageCur = 1;
function onClick(event:MouseEvent):void{
    navigateToURL(new URLRequest(".html"),"_self");
function initiate():void{
    myContainer = new MovieClip();
    myLoader = new Loader();
    myRequest = new URLRequest("data/banner/image1.jpg");
    ranNum = Math.random();
    myContainer.buttonMode = true;
    var timer:Timer = new Timer(time*1000);
    timer.addEventListener(TimerEvent.TIMER, onTimer);
    myLoader.addEventListener(MouseEvent.CLICK, onClick); = String(imageCur);