Closed sankar2389 closed 9 years ago
Please try this branch https://github.com/fljot/Gestouch/tree/features/71-fix-initialization – I have refactored some initialization stuff – see changelog for instructions: https://github.com/fljot/Gestouch/blob/features/71-fix-initialization/CHANGELOG.md I need some confirmation that it works=)
Don't re-do all this initialization stuff when you create another Starling instance. Setup input adapter and add display list adapter only once. And regarding hit-tester – just keep a reference to once created and added Oh snap StarlingTouchHitTester
and update starling reference thereStarlingTouchHitTester
has no way to update starling
property – it's set in constructor only... Well, then on dispose call:
Gestouch.removeTouchHitTester(this.myStarlingTouchHitTester);
and when create starling do:
this.myStarlingTouchHitTester = new StarlingTouchHitTester(this.starling);
Gestouch.addTouchHitTester(this.myStarlingTouchHitTester, -1);
Thanks Fljot, now it works :)
@sankar2389 and branch code – all good?
I use starling for book reader app. When i change the book, i'm disposing the current starling and create new starling instance.But when I created new starling, Gestouch doesn't works.
How to restart gestouch for a new starling instance
gestouch code.
}
thank you