Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
subhaMaz
Posts: 18
Registered: ‎02-18-2011
My Device: Not Specified

How to catch Scroll Event of QNXStageWebView

Hi All

Recently I am trying to develop one Playbook AIR App for Online Magazine. I'm getting the links of all the html pages for server. My goal is to scroll any particular web page across up-down scroll and change of web page(next or Prev ) across left-right scroll.

But

            Multitouch.inputMode = MultitouchInputMode.GESTURE;
            stage.addEventListener(TransformGestureEvent.GESTURE_SWIPE, onSwipe);

 

is not working properly on QNXStageWebView. Also the QNXStageWebView is a final class, we can't override it to use

public function scrollBy(dx:int, dy:int):void method. 

 

So how to catch the Scroll Event of the QNXStageWebView??? Any Trick???

 

 

Thanks-

subha

Retired
rmasroor
Posts: 172
Registered: ‎06-07-2010
My Device: BlackBerry 8520

Re: How to catch Scroll Event of QNXStageWebView

Hello SubhaMaz,

 

How are you doing? I hope all is well.

 

Just to understand the logic of your app, is your html link in a list? With the swipe of a gesture (TransformGestureEvent.GESTURE_SWIPE), are you expecting the app to cycle to the next link on the home page and load it on the QNXStageWebView?

 

Looking forward to your reply.

Raihan Masroor
BlackBerry Development Advisor
Contributor
subhaMaz
Posts: 18
Registered: ‎02-18-2011
My Device: Not Specified

Re: How to catch Scroll Event of QNXStageWebView

Hi Raihan

 

Thanks for your positive concern regarding the Issue. I'm doing well... hope you too..

 

In my app after the Splash Screen I'm getting some html links from server and showing the first html page in QNXStageWebView. If I scroll it vertically it should scroll as it is default.

But if we Scroll it horizontally(right to left) QNXStageWebView should load the next web page and previous page for Scrolling Horizontally left to right in the same QNXStageWebView.

 

I am finding for any Event which is thrown when we Swipe through QNXStageWebView, But didn't get any yet.


            stage.addEventListener(TransformGestureEvent.GESTURE_SWIPE, onSwipe);

is not working in this context. Please give me any way out ASAP.

 

Regards-

subhaMaz.

 



Retired
rmasroor
Posts: 172
Registered: ‎06-07-2010
My Device: BlackBerry 8520

Re: How to catch Scroll Event of QNXStageWebView

Hello subHaz,

 

I apologize for the delay in my answer as I have been trying with many different ways to detect a swipe gesture between two points on a screen short of MouseEvent.

 

There might be an issue but I'm still investigating. 

 

Might I ask how extensive is your AIR implementation? Since I see that your use case, your primary purpose is to display web content. A best alternative is to use WebWorks as touch and swipe events are easily detectable in HTML5. An since your content is web based, making the app is a clear cut method.

 

Let me know if this is a possible option for you.

 

Looking forward to your reply. 

Raihan Masroor
BlackBerry Development Advisor
Contributor
subhaMaz
Posts: 18
Registered: ‎02-18-2011
My Device: Not Specified

Re: How to catch Scroll Event of QNXStageWebView

[ Edited ]

Hi Raihan

I'm thankful to you as you tried to dig that issue by yourself.
I am not proficient with webworks, so I could not go for that.

The AIR issue has not been solved yet, but I have find out some different approach to avoid this issue. Now I need to listen at least a mouseclick event on QNXStageWebView. but no luck yet. Could you please try it for me.

If you get any trick to sense the gesture on QNXStageWebView, please inform me, it can be helpful for me and others who will have this issue. I'm trying to solve it as well.

Thanks-
subhaMaz

Retired
rmasroor
Posts: 172
Registered: ‎06-07-2010
My Device: BlackBerry 8520

Re: How to catch Scroll Event of QNXStageWebView

Hello subhaMaz,

 

Just a bit on what is happening from my investigation.

 

When trying to implement

QNXStageWebView.addEventListener(TransformGestureEvent.GESTURE_SWIPE, onSwipe); or

stage.addEventListener(TransformGestureEvent.GESTURE_SWIPE, onSwipe);

the gestures are happening over the QNXStageWebView. In this manner, the WebKit is receiving the the events rather than the air runtime which is why onSwipe never gets triggered. Perhaps you can make use of this behaviorby implementing without your html gesture handle events.

 

It is also likely possible to have AIR get all the input by pushing the WebKit window behind AIR's and setting the sentivity of AIR's window to grab all input via

 

var window:IowWindow = IowWindow.getAirWindow();

window.sensitivity = IowWindowSensitivity.ALWAYS;

 

But it looks like this method is making the web page a little less responsibe. I'm currently investigating to workaround into this.

 

 

Raihan Masroor
BlackBerry Development Advisor
Contributor
subhaMaz
Posts: 18
Registered: ‎02-18-2011
My Device: Not Specified

Re: How to catch Scroll Event of QNXStageWebView

[ Edited ]

Hello Raihan

 

I'm extremely sorry for being late. Hope you are doing well.

 

During this time I was very busy to complete my rest of the project functionalities as vacation for DURGA PUJA is coming very shortly.

 

Whatever I have followed your trick but related issue(poor response from QNXStageWebView) is also happening. User can't compromise with this as I can understand. So looking forward for the better solution at end(almost) of this project.

 

Thanks for your all kind of collective effort and cooperation.

 

Thanks-

subha