Jump to content
Search Community

Goon Nguyen

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Goon Nguyen

  1. Actually, JavaScript is crazy flexible (uncomfortably so sometimes), so I'm pretty sure you can do this:

    var a = [1,2,3,4];
    var b = [0,0,0,0];
    b.onUpdate = function() {
    	console.log(a[0], a[1], a[2], a[3]);
    };
    TweenLite.to(a, 2, ; //tween the values of a to those of b over 2 seconds, and log them to the console.

    Arrays are just objects whose properties are named numerically instead of using strings. 

    Brilliant!

×
×
  • Create New...