Hello all -
I have a strange issue that I have not had on previous iOS projects for iPad2. When I press a button to play a movie using “iPhoneUtils.PlayMovie()”, everything works great, the movie plays with no issues at all. Upon completion, or when I press the Done button, the movie goes away as expected, and the game window reappears and is animating as before.
This is where the weird issue begins. When I touch anywhere on the screen (the button, or any other ‘dead’ area on screen), the video launches again. In other words, no matter where I touch, it behaves as if the video button were touched. I verified that the button (ppBtn) does not change size or position after the movie closes. Does anybody have any suggestions on what could be causing this?
Here’s the code that launches the video: (Note: we are using xtuio).
public void bgTouchDown(BBTouchEvent aTouch)
{
if (!locked)
{
Ray r = _orthoCamera.ScreenPointToRay(aTouch.screenPosition);
RaycastHit hit;
if (Physics.Raycast(r, out hit, 50, 1 << orthoLayer))
{
string name = hit.collider.name;
if (name == "ppBtn")
{
string source = xml.DocumentElement.SelectSingleNode("//video").Attributes["src"].Value;
iPhoneUtils.PlayMovie(source, Color.black, iPhoneMovieControlMode.Full);
}
}
}
}