Hi all.
I'm trying to get GSAP to tween properties of an EaselJS bezier curve.
Code is here:
<script>
function init() {
var stage = new createjs.Stage("myCanvas"); //create the stage
var circle = new createjs.Shape(); //create a shape
var line = new createjs.Shape(); //testing lines - first create a shape
var l = line.graphics; //then the line graphic
var animateLineTest = 100; //then a point to test animation
circle.graphics.beginFill("black").drawCircle(0, 0, 50);
circle.x = 100;
circle.y = 100;
stage.addChild(circle);
l.setStrokeStyle(5, 'round','round');
l.moveTo(100, 100);
l.beginStroke("#333");
l.beginFill();
l.bezierCurveTo(100, animateLineTest, 388, 10, 388, 170);
stage.addChild(line);
circle.on("mousedown", function(){
TweenMax.to(circle, 1, {alpha:0, onUpdate:stage.update, onUpdateScope:stage});
TweenMax.to(animateLineTest, 1, {value:150, onUpdate:stage.update, onUpdateScope:stage});
});
stage.update(); //redraw the stage
}
</script>
However I get an error: TypeError: Attempted to assign to readonly property
Any thoughts? Cheers.