Hi Todd,
you have to add the word video to your play command for iOS. As in
Code: Select all
play video specialFolderPath("engine") & "/media/creativity.mov"
this is the version without controller that is mentioned in the documentation. It sends the "movieTouched" message if you touch the movie, so you can stop it with
Code: Select all
on movieTouched
play stop
end movieTouched
in the card script.
I you want the controller to show you script:
Code: Select all
on mouseUp
set the showController of the templateplayer to true
play video (specialFolderPath("Engine") & "/media/creativity.mov")
end mouseUp
that way the user can control the movie via the controller
That took me a long time to figure out since the documentation is less than clear for me on that:
play ( video-file | video-url )
How is one supposed to guess the correct syntax from that?
Please note that the iOS devices dont play just any of the .mov files that work on the desktop. I successfully exported/converted via Quicktime Player using .m4v or .3gp, .3gp being very small but also low qualtiy. Other formats may work but I only tried these two.
Kind regards
Bernd
EDIT:
A WORD OF CAUTION:
if you are on a Mac and copy code from the forum to your scripts and you want these scripts to run on iOS then please watch out for a strange bug.
Currently the copy/paste from Forum to the script editor adds ASCII 202 insted of just spaces into the indention.This will not affect the performance in the IDE. BUT if you want to run the same script in the Simulator or a device it will fail silently, as if no code was entered. That bit me a couple of times.
The remedy is to either retype the text (cumbersome)
or to copy the script to TextWrangler (a free text editing program) and then -> Menu "Text" -> "Convert to ASCII" and copy the text into the script editor.
Additionally you have the option to show invisible characters in TextWrangler, which is at times very handy.
TextEdit -> convert to text will often not do.
Bernd
EDIT 2
RunRev is aware of the ASCII 202 problem and it is fixed for the 4.6 version of Livecode. (as of DP6)