Closed glacialspring closed 11 years ago
By the way, I just downloaded the newest from this repo and it is still true.
All you need to do is create one tween to instantiate the engine. It can be a zero-duration tween of an empty object like TweenLite.to({}, 0, {}) or a delayedCall() to a dummy function. Just one, and then it'll dispatch tick events normally.
I compile this code in Flash builder 4.7 will be error in " TweenLite.ticker.addEventListener("tick", tick);" and I check its API cannot find ticker.
hellogavin, it sounds like maybe you're using a very old version of TweenLite (version 11.x or earlier instead of 12.x). The ticker was introduced in v12.
I had trouble making the ticker work, both from TweenLite and Animation classes. TweenLite.to() works fine however. The function is just never called.
I tested it in an a new, pure AS3 mobile project in FlashDevelop. I'm using AIR sdk 3.7 with FlashDevelop 4.4.2 Tested basic code:
circle = new Sprite(); circle.graphics.beginFill(0xff0000); circle.graphics.drawCircle(0, 0, 100); circle.graphics.endFill(); addChild(circle); TweenLite.ticker.addEventListener("tick", tick);
private function tick(event:Event):void { trace("tick"); circle.x += 2; circle.y += 2; }