Page 1 of 1

Audio playing but not video

Posted: Sun Feb 03, 2013 8:01 pm
by bruceBUSXpd
Hey Guys,

In my second card of my stack I have an image which when clicked should play video. In the simulator when the image is clicked only the audio plays not the video as well. Check out my code below....

Cheers,

Code: Select all

on MouseUp
// When user clicks on image it disappears
set the visible of image "new-video-splash-images.png" to false
   // Check the control doesn't already exist. If so delete and recreate it
if "ioscontrol" is among the lines of iphoneControls() then
controlDelete
end if 
iphoneControlCreate "player", "ioscontrol"

// Set the basic properties including visibility, rectangle and video file path
iphoneControlSet "ioscontrol", "filename", specialFolderPath("engine") & "/video/teil1-5.mov"
iphoneControlSet "ioscontrol", "preserveAspect", true
iphoneControlSet "ioscontrol", "showController", true
iphoneControlSet "ioscontrol", "visible", true

// Start playing the video
iphoneControlDo "ioscontrol", "play"

   
end MouseUp


Re: Audio playing but not video

Posted: Sun Feb 03, 2013 9:44 pm
by endernafi
Hi Bruce,

You haven't set the rect of the control.
That may be the problem.

Hope it helps...

Best,

~ Ender Nafi

Re: Audio playing but not video

Posted: Wed Feb 06, 2013 9:28 pm
by bruceBUSXpd
Thanks Ender,

The rect control was all that I needed.

Cheers,