Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use gestouch in starling2 and normal swf file with together ? #104

Open
yooni126 opened this issue Sep 26, 2017 · 1 comment
Open

Comments

@yooni126
Copy link

yooni126 commented Sep 26, 2017

I used gestouch in a normal swf file.
also I used gestoch in my starling 2 app with these codes:

Gestouch.inputAdapter = new NativeInputAdapter(stage); _starling2TouchHitTester = new Starling2TouchHitTester(); Gestouch.addTouchHitTester(_starling2TouchHitTester, -1); Gestouch.addDisplayListAdapter(DisplayObject, new StarlingDisplayListAdapter());

Now I want to load my swf file with nativeOverlay in starling2 with this code:

_mLoader = new Loader(); var mRequest:URLRequest = new URLRequest("drawer.swf" + "?nf=" + getTimer()); _mLoader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, onCompleteHandler); _mLoader.load(mRequest); private function onCompleteHandler(loadEvent:flash.events.Event):void { var _designMain:object = loadEvent.target.loader.content; }

but when i load it , I have this error:

ReferenceError: Error #1065: Variable NativeDisplayListAdapter is not defined.
at org.gestouch.core::Gestouch$/org.gestouch.core::gestouch_internal::createGestureTargetAdapter()
at org.gestouch.gestures::Gesture/set target()
at org.gestouch.gestures::Gesture()
at org.gestouch.gestures::AbstractContinuousGesture()
at org.gestouch.gestures::TransformGesture()
at Main()[E:\Flash\Drawer_Mobile\Main.as:277]

Now this is my question : How can I use gestouch in starling and normal swf file with together ?

@yooni126 yooni126 changed the title Type Coercion failed Variable NativeDisplayListAdapter is not defined. Sep 26, 2017
@yooni126 yooni126 reopened this Sep 26, 2017
@yooni126 yooni126 changed the title Variable NativeDisplayListAdapter is not defined. How can I use gestouch in starling2 and normal swf file with together ? Sep 26, 2017
@fljot
Copy link
Owner

fljot commented Sep 26, 2017

I'm not really dealing with Flash much anymore, so can't really investigate much, sorry...
But here's what's on top:
Seems like you're working with some master branch version. There's nothing complicated inside, look https://github.com/fljot/Gestouch/blob/master/src/org/gestouch/core/Gestouch.as it somehow can't find that class in runtime, so maybe it's something with the way you build those swfs. Are you sure you're using same version of Gestouch in both swfs?

Can you maybe switch to using code from develop branch with a small configuration change (https://github.com/fljot/Gestouch/blob/develop/CHANGELOG.md)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants