Article View: comp.sys.mac.programmer.codewarrior
Article #658about movie controller
From: wall
Date: Sat, 25 Oct 2003 09:56
Date: Sat, 25 Oct 2003 09:56
56 lines
2773 bytes
2773 bytes
I have four views in my window, and I want to every view can play
movie with controller.So I wrote a function in the view class,but it
not work well.
ShowMovie( FSSpec inFileSpec )
{
FInfo theFileInfo;
OSErr theErr = ::FSpGetFInfo ( &inFileSpec, &theFileInfo );
if ( FOUR_CHAR_CODE('MPG ') == theFileInfo.fdType )
{
OSErr theErr;
short theFileRefNum;
theErr = ::EnterMovies();
if ( theErr )
return;
theErr = ::OpenMovieFile( &inFileSpec, &theFileRefNum, fsRdPerm );
if ( theErr == noErr )
{
short nResID = 0; //We want the first movie.
Str255 strName;
Boolean bWasChanged;
theErr = ::NewMovieFromFile(&mMovie, theFileRefNum, &nResID,
strName,
newMovieActive, &bWasChanged);
::CloseMovieFile( theFileRefNum );
if (mMovie == nil) return;
Rect movieBox;
// 0,0 Movie coordinates
GetMovieBox(mMovie, &movieBox);
MacOffsetRect(&movieBox, -movieBox.left, -movieBox.top);
SetMovieBox (mMovie, &bounds);
MCSetControllerAttached(aController, true);
// set the movie's play hints to allow dynamic resizing
SetMoviePlayHints(mMovie, hintsAllowDynamicResize,
hintsAllowDynamicResize);
SetMovieGWorld (mMovie, (CGrafPtr)GetMacPort(), nil);
StartMovie (mMovie);
Boolean done = false;
while ( !IsMovieDone(mMovie) && !done )
{
MoviesTask (mMovie, DoTheRightThing);
}
}
}
}
someone give me some advice, why the movie controller not in movie
box?
Thanks a lot.(Sorry, my english is very poor)
Technical Details
Message-ID:
<7328a61a.0310250156.5573ceae@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bcce,2cbb4f6ec637b042,start X-Google-Attributes: gid10bcce,public X-Google-Thread: f98ee,2cbb4f6ec637b042,start X-Google-Attributes: gidf98ee,public X-Google-Thread: f635e,2cbb4f6ec637b042,start X-Google-Attributes: gidf635e,public X-Google-Thread: 11100c,2cbb4f6ec637b042,start X-Google-Attributes: gid11100c,public X-Google-ArrivalTime: 2003-10-25 02:56:31 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: heroin_c@hotmail.com (wall) Newsgroups: comp.sys.mac.programmer.codewarrior,comp.os.ms-windows.programmer.tools.misc,codewarrior.mac,comp.sys.mac.programmer.tools Subject: about movie controller Date: 25 Oct 2003 02:56:31 -0700 Organization: http://groups.google.com Lines: 56 Message-ID: <7328a61a.0310250156.5573ceae@posting.google.com> NNTP-Posting-Host: 210.83.195.53 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1067075791 14815 127.0.0.1 (25 Oct 2003 09:56:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 25 Oct 2003 09:56:31 +0000 (UTC)