Hi Friends,

I have developed the following script for scrolling dynamically loaded
content in the movie clip. 

The script is working fine. I just wanted to know is it consuming lot of
memory? Because when I load this movie onto another movie. The first
movie become slower.

Thanks,
PP



////////////////////////////////////////////////////////////
scrollingspeed = 4;

leftmenu_downbtn.onPress = function(){
        scrollingspeed = 8;
        
}
leftmenu_downbtn.onRelease = function(){
        scrollingspeed = 4;

}

leftmenu_downbtn.onRollOver = function(){
        scrollingspeed = 4;
        leftscrollup=true;
        leftscrolling_fn();
}
leftmenu_downbtn.onRollOut = function(){
        leftscrollup=false;
        leftscrolling_fn();
}
/////////////////////////
leftmenu_upbtn.onPress = function(){
        scrollingspeed = 8;

}

leftmenu_upbtn.onRelease = function(){
        scrollingspeed = 4;

}

leftmenu_upbtn.onRollOver = function(){
        scrollingspeed = 4;
        leftscrolldown=true;
        leftscrolling_fn();
}
leftmenu_upbtn.onRollOut = function(){
        leftscrolldown=false;
        leftscrolling_fn();
}

function leftscrolling_fn(){
        var test =
this.createEmptyMovieClip("test",this.getNextHighestDepth());
        test.onEnterFrame = function(){
                
        if(leftscrollup){
                //trace("Moving Up...");
                var MaskD:Number = leftmask._y + leftmask._height;
                var LeftClipD:Number = PrintClip._y + PrintClip._height;
                //trace("LeftClipD : "+LeftClipD);
                //trace("MaskD : "+MaskD);
                if (LeftClipD >=MaskD) {
                PrintClip.yMove = PrintClip.yMove - scrollingspeed;
                updateAfterEvent();
                }
        }
        else if(leftscrolldown){
                //trace("Moving Down...");
                if (leftmask._y >=PrintClip._y) {
                PrintClip.yMove = PrintClip.yMove + scrollingspeed;
                updateAfterEvent();
                }
        }
        else{
                //trace("No Moving...");
                delete test.onEnterFrame;
        }
        }
}

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to