ScrollRectPlugin

[AS3/AS2] Tweens the scrollRect property of a DisplayObject. You can define any (or all) of the following properties:

  • x : Number
  • y : Number
  • width : Number
  • height : Number
  • top : Number
  • bottom : Number
  • left : Number
  • right : Number

Usage

import com.greensock.TweenLite; 
import com.greensock.plugins.TweenPlugin; 
import com.greensock.plugins.ScrollRectPlugin; 
TweenPlugin.activate([ScrollRectPlugin]); //activation is permanent in the SWF, so this line only needs to be run once.
TweenLite.to(mc, 1, {scrollRect:{x:50, y:300, width:100, height:100}});

Get GSAP

Version: 1.20.3 updated 2017-10-02

Core

    Extras

      Plugins

        By using GreenSock code, you agree to the terms of use.

        For an all-access pass to premium content

        Join Club GreenSock