Note: The iPhone has no default system alert sound so if a sound is required one must be specified using the beepSound property. The action of beep is controlled by the system and depends on the user's preference settings. In particular a beep will only cause a vibration if the user has enabled that feature. Similarly, a beep will only cause a sound if the phone is not in silent mode.
This I guess means that I I play a sound that I provide the delay will be significant and not as immediate as the beep of a desktop computer... Anyway I will try.
Last edited by Mag on Tue Jun 25, 2013 3:16 pm, edited 1 time in total.
It doesn't matter whether you try a beep or an answer dialog or something else you can come up with, as long as you can tell me whether something happens right after executing the mergAVCamCreate control or much later, but I think I'm slowly getting what's going on. Will get back to it later today.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
It doesn't matter whether you try a beep or an answer dialog or something else you can come up with, as long as you can tell me whether something happens right after executing the mergAVCamCreate control or much later, but I think I'm slowly getting what's going on. Will get back to it later today.
Best,
Mark
Thanks Mark, great, I will try with a put in field command.
on preOpenCard
// don't do anything, let stack render itself first
// disableButtons
end preOpenCard
on openCard
// send createCam message only after LiveCode is ready
send "createCam" to me in 0 millisecs
// send "enableButtons" to this stack in 100 milliseconds
end openCard
on createCam
disableButtons
put the millisecs into myTimer
try
mergAVCamCreate
catch e
-- answer e
end try
answer (the millisecs - myTimer)
// sending enableButtons to stack causes execution error
send "enableButtons" to me in 100 millisecs
end createCam
on enableButtons
hide button "viewCover" of card "main"
end enableButtons
on disableButtons
show button "viewCover" of card "main"
end disableButtons
// this doesn't seem to be relevant for our problem
on closeCard
mergAVCamDelete
end closeCard
Let me know the time in the answer dialog that appears and whether the answer dialog appears before or after the AV Cam control is visible.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
At startup about 1127
When returning from another card about 1490
PS
Please note that in an iPod the AV control in this stack takes about 3/4 seconds to create in quality "Standard" (which is the one I use for tests), in quality "High" about 5/6 seconds
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
What would the user tap on? On the AV Cam control or something else?
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
I tested more on a button (record button) which starts a timer and then performs the video recording. But this is true for all the buttons present in the card (go to settings, go to preview card and so on), some of them has mouseUp handlers, other have mouseDown handlers. Naturally the effects of the pressing of the button starts as soon as the control is created and the cover button is disappeared.
What happens if you send the enableButtons message in 10 seconds? Does the 2nd tap still cause the mouseUp handler in the button to run? Do any other scripts in your project run? Do you have any other scripts that run automatically when the stack or card opens?
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
What happens if you send the enableButtons message in 10 seconds? Does the 2nd tap still cause the mouseUp handler in the button to run? Do any other scripts in your project run? Do you have any other scripts that run automatically when the stack or card opens?
Kind regards,
Mark
With 4 or more seconds all works and all taps are ignored.
PS
Currently all the other scripts in openCard and preOpenCard are commented.
What is happening here is really weird. For now, I'm out of ideas. I think you should report this problem to Monte. Ask him to update the external, e.g. with a callback message that is sent when the external finishes setting up the control.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
FlushEvents is incompatible with iOS (this thread is in the iOS Deployment forum). This was mentioned two times earlier in this thread.
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode