Touch Events on Native Video

Is it possible to detect touches on native video objects? I’m currently having trouble.

I basically have a video that should pop up and fill the screen when a button is clicked, and while it is playing I want to enable a touch event listener so I can add in a couple of touch controls, and also disable any touches going to the objects behind (it would be a pain to remove all these individually).

At the moment I’m testing it with the following code (simplified):

[code]function videoTouch(event)
local alert = native.showAlert(“Video”,“Touched”,{“OK”})
return true
end

video = native.newVideo(0, 0, 640, 360)
video:load(“videos/” … self.file)
video:addEventListener(“touch”, videoTouch)
video:play()
[/code]

However I don’t get the alert showing up and the touches are still going through to the objects behind. [import]uid: 167874 topic_id: 29604 reply_id: 329604[/import]

You cannot assign touch events to native objects. The touch listeners only work on openGL object. Native objects do not use openGL and always appear on top of openGL objects.

-Tom [import]uid: 7559 topic_id: 29604 reply_id: 118890[/import]

Couldn’t you use buttons on top of the video set to invisible?
I’m curious how that would work…

[import]uid: 4157 topic_id: 29604 reply_id: 119960[/import]

Couldn’t you use buttons on top of the video set to invisible?
I’m curious how that would work…

[import]uid: 4157 topic_id: 29604 reply_id: 119960[/import]