MPMoviePlayerController?

Scott Rossi scott at tactilemedia.com
Sat May 19 05:21:23 EDT 2012


Hi List:

Am wondering if someone can doublecheck this code for playing a video on
mobile (card script).  Seems pretty straightforward:

local sPlayerId

on openStack
   if environment() is "mobile" then
      iphoneControlCreate "player"
      put the result into sPlayerId
      
      iphoneControlSet sPlayerId, "rect", rect of grc "view"
      iphoneControlSet sPlayerId, "filename", specialFolderPath("engine") &
"/test.mov"
      iphoneControlSet sPlayerId, "fullscreen", false
      iphoneControlSet sPlayerId, "preserveAspect", true
      iphoneControlSet sPlayerId, "showController", false
      iphoneControlSet sPlayerId, "shouldAutoplay", false
      iphoneControlSet sPlayerId, "looping", true
   end if
end openStack


command playTheMovie
   iphoneControlDo sPlayerId, "play"
end playTheMovie



When I run this in the simulator, no video shows up.
Testing sPlayerId results in a value of 1.
Testing for the existence of the video file is true (video is assigned using
standalone app settings under Copy Files).
Testing the rect shows the correct values.

What am I missing?

Thanks & Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design






More information about the Use-livecode mailing list