mobile player control with hidden controls

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tetsuo29
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 103
Joined: Thu Jun 07, 2007 1:30 am

mobile player control with hidden controls

Post by tetsuo29 » Sun Nov 17, 2019 1:47 am

When using a mobile player control with hidden controls, how do I respond to a tap?

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: mobile player control with hidden controls

Post by bogs » 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?
Image

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: mobile player control with hidden controls

Post by [-hh] » Sun Nov 17, 2019 11:55 am

@bogs.
(Of course we are talking about browse mode only.)
Certainly on desktop an unlocked field receives mouseDown and mouseUp: When rightClicking.
shiftLock happens

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: mobile player control with hidden controls

Post by bogs » Sun Nov 17, 2019 1:09 pm

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.
Image

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: mobile player control with hidden controls

Post by [-hh] » Sun Nov 17, 2019 2:16 pm

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
shiftLock happens

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: mobile player control with hidden controls

Post by bogs » Sun Nov 17, 2019 2:19 pm

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 :)
Image

tetsuo29
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 103
Joined: Thu Jun 07, 2007 1:30 am

Re: mobile player control with hidden controls

Post by tetsuo29 » Sun Nov 17, 2019 10:40 pm

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.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: mobile player control with hidden controls

Post by bogs » Sun Nov 17, 2019 11:38 pm

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:
Image

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: mobile player control with hidden controls

Post by bwmilby » 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?
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

tetsuo29
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 103
Joined: Thu Jun 07, 2007 1:30 am

Re: mobile player control with hidden controls

Post by tetsuo29 » Tue Nov 19, 2019 10:14 pm

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.

tetsuo29
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 103
Joined: Thu Jun 07, 2007 1:30 am

Re: mobile player control with hidden controls

Post by tetsuo29 » Sat Nov 23, 2019 5:40 pm

Still wondering if anyone knows of a way to respond to taps on a mobile player when the controls are hidden?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: mobile player control with hidden controls

Post by jacque » 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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

tetsuo29
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 103
Joined: Thu Jun 07, 2007 1:30 am

Re: mobile player control with hidden controls

Post by tetsuo29 » Sun Nov 24, 2019 10:34 pm

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.

Post Reply

Return to “iOS Deployment”