mobile player control with hidden controls
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
mobile player control with hidden controls
When using a mobile player control with hidden controls, how do I respond to a tap?
Re: mobile player control with hidden controls
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?
-
- 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
@bogs.
(Of course we are talking about browse mode only.)
Certainly on desktop an unlocked field receives mouseDown and mouseUp: When rightClicking.
(Of course we are talking about browse mode only.)
Certainly on desktop an unlocked field receives mouseDown and mouseUp: When rightClicking.
shiftLock happens
Re: mobile player control with hidden controls
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
...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.
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
-
- 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
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:
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
Re: mobile player control with hidden controls
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
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
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
Re: mobile player control with hidden controls
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
Script Tracker https://github.com/bwmilby/scriptTracker
Re: mobile player control with hidden controls
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
Still wondering if anyone knows of a way to respond to taps on a mobile player when the controls are hidden?
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: mobile player control with hidden controls
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
HyperActive Software | http://www.hyperactivesw.com
Re: mobile player control with hidden controls
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.