Page 1 of 1

mobile player control with hidden controls

Posted: Sun Nov 17, 2019 1:47 am
by tetsuo29
When using a mobile player control with hidden controls, how do I respond to a tap?

Re: mobile player control with hidden controls

Posted: Sun Nov 17, 2019 10:06 am
by bogs
Well, I'm not positive on mobile, but doesn't it respond like the desktop does, where you can mouseUp on anything that isn't an unlocked field?

Re: mobile player control with hidden controls

Posted: Sun Nov 17, 2019 11:55 am
by [-hh]
@bogs.
(Of course we are talking about browse mode only.)
Certainly on desktop an unlocked field receives mouseDown and mouseUp: When rightClicking.

Re: mobile player control with hidden controls

Posted: Sun Nov 17, 2019 1:09 pm
by bogs
I should have been more specific heh.

I meant that if you lock a field, and turn its transversal off, you can treat it like a button in the mouseUp handler. If it isn't locked, and/or the transversal is set to true, it swallows mouseUp to be only in terms of things you can do in a field, i.e. get the selected chunk, etc.

On the other hand, almost all other objects (graphics, images, lines, etc) receive and use the mouseUp similarly to how a button does, I am assuming the player object does as well, but I certainly could be wrong on that count.

If it does, on a player control without the controls attached, couldn't you just do something like

Code: Select all

on mouseUp
	play video myVideoFile
end mouseUp
...and expect it to work as if you had the player controls play button showing? If not, then I suspect you'd have to craft your own controls, or set the player controls to visible in a mouseEnter event handler instead.

Re: mobile player control with hidden controls

Posted: Sun Nov 17, 2019 2:16 pm
by [-hh]
I really didn't doubt you know that.
My point is that some readers could be misleaded by your claim that on desktop an unlocked field can't get a mouseUp.

For example this works on a field whether locktext is true or not, when rightClicking the field:

Code: Select all

on mouseDown
   grab me
end mouseDown

on mouseUp
   answer the params
end mouseUp

Re: mobile player control with hidden controls

Posted: Sun Nov 17, 2019 2:19 pm
by bogs
Ah I see. I still should have taken the time to be more specific, we sure don't want to add confusion. Thanks for the catch :)

Re: mobile player control with hidden controls

Posted: Sun Nov 17, 2019 10:40 pm
by tetsuo29
bogs wrote:
Sun Nov 17, 2019 10:06 am
Well, I'm not positive on mobile, but doesn't it respond like the desktop does, where you can mouseUp on anything that isn't an unlocked field?
I can't get it to. I've tried responding to mouseUp and touchEnd in the card with the script that creates the mobile player and both seem to be ignored.

Re: mobile player control with hidden controls

Posted: Sun Nov 17, 2019 11:38 pm
by bogs
Sorry then, I'm out of ideas. We'll have to wait for someone that actually programs for mobile to show up and clue us in :wink:

Re: mobile player control with hidden controls

Posted: Tue Nov 19, 2019 12:58 am
by bwmilby
What object are you trying to get to respond to the messages? Have you tried putting a few test buttons on the card?

Re: mobile player control with hidden controls

Posted: Tue Nov 19, 2019 10:14 pm
by tetsuo29
bwmilby wrote:
Tue Nov 19, 2019 12:58 am
What object are you trying to get to respond to the messages? Have you tried putting a few test buttons on the card?
No, I haven't tried putting buttons on the card becasue I want to play a video full screen, looping, and allow the user to tap on it to quit it. So, I want to be able to respond to taps on a mobile player that was created in script.

Re: mobile player control with hidden controls

Posted: Sat Nov 23, 2019 5:40 pm
by tetsuo29
Still wondering if anyone knows of a way to respond to taps on a mobile player when the controls are hidden?

Re: mobile player control with hidden controls

Posted: Sun Nov 24, 2019 6:02 pm
by jacque
I haven't tried it but you could test with a mouseUp handler in the card to see if the tap will register there. If so, the handler can check if the tap was within the player rect, or some other condition, and respond.

Re: mobile player control with hidden controls

Posted: Sun Nov 24, 2019 10:34 pm
by tetsuo29
jacque wrote:
Sun Nov 24, 2019 6:02 pm
I haven't tried it but you could test with a mouseUp handler in the card to see if the tap will register there. If so, the handler can check if the tap was within the player rect, or some other condition, and respond.
I’ve tried responding to mouseUp and touchEnd in the card script- the script where I’m creating the mobile player. Tapping on the movie when it’s playing on my phone doesn’t appear to send any messages to the card. :-(

I also tried setting the script property of the mobile player once it’s created. That didn’t work either.