FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

DRAWING

Play QuickTime files without a window


Here's my improved answer. Assuming you're using FB II (I haven't looked at the QT demo in FB 3 yet, but I imagine it's very similar), replace FN NewMovieWindow with this one (watch for line wrap).
CLEAR LOCAL MODE
DIM boxT%,boxL%,boxB%,boxR%
DIM MCRect;8
DIM fsSpec;0,fsVRefNum%,fsParID&,63 fsName$                   'standard file spec record
LOCAL FN NewMovieWindow(MovieBlockPtr&,fsName$,fsVRefNum%,MTop%,MLeft%,Flags%)
  WindowNumber% = 0
  LONG IF MovieBlockPtr&
    '
    LONG IF fsName$ = ""
      fsName$ =FILES$(1,"MooV",,fsVRefNum%)                   'get a QuickTime movie
    END IF
    '
    LONG IF fsName$ <> ""
      pBlk& = @paramBlock$                                    'pBlock for file spec
      & pBlk& + _ioNamePtr  ,@fsName$                         'file name to pBlock
      % pBlk& + _ioVRefNum  ,fsVRefNum%                       'vol ref num to pBlock
      % pBlk& + _ioFDirIndex,0                                'flag pBlk to use name & vRef
      OSErr% = FN GETCATINFO(pBlk&)                           'get info on movie file
      fsParID& = [pBlk& + _ioFLParID]                         'parent ID is what we needed
      '
      LONG IF FN OPENMOVIEFILE(fsSpec,MovieResRefNum%,_FSRdPerm) = _NoErr
        '
        LONG IF FN NEWMOVIEFROMFILE(Movie&,MovieResRefNum%,resID%,resName$,1,dataRefChgd%) = _noErr
          '
          DO
            MovieBlockPtr& = MovieBlockPtr& + _MovieInfoSize
            INC(WindowNumber%)
          UNTIL WINDOW(-WindowNumber%) = 0                    'UnUsed Window...
          '
          CALL GETMOVIEBOX(Movie&,boxT%)                      'get rect for movie
          CALL OFFSETRECT(boxT%,-boxL%,-boxT%)                'offset to zero (Z will center)
          
          LONG IF (boxB% > boxT%) AND (boxR% > boxL%)         ' check for valid movie box
            movieExists% = 1                                  ' has a movie track
          XELSE
            movieExists% = 0                                  ' no movie track (sound track only)
          END IF
          '
          LONG IF Flags% AND 8                                ' --  --  --  Double Size  -- --  -- 
            boxB%=boxB%+boxB%
            boxR%=boxR%+boxR%
          END IF
          '
          CALL SETMOVIEBOX(Movie&,boxT%)                      'say this is our rect
          LONG IF Flags% AND 1
            boxB% = boxB%+16                                  'add to bottom for controller
            IF movieExists% = 0 THEN boxR% = boxR%+160 ' add to right for controller if no movie track
          XELSE
            IF movieExists% = 0 THEN WindowNumber% = -WindowNumber%
          END IF
          
          WINDOW WindowNumber%,fsName$,(MLeft%,MTop%)-(boxR%+MLeft%,MTop%+boxB%),5_updateVisRgn
          'build the window
          CALL GETGWORLD(CGrafPtr&,CurDev&)
          CALL SETMOVIEGWORLD(Movie&,CGrafPtr&,0)             'tell QT to use this grafport
          
          LONG IF Flags% AND 1
            MCRect;8 = CGrafPtr&+_PortRect
            MovieCT& = FN NEWMOVIECONTROLLER(Movie&,MCRect,&15)
            rslt     = USR MCNEWATTACHEDCONTROLLER(MovieCT&,Movie&,CGrafPtr&,#0)
          XELSE
            CALL GOTOBEGINNINGOFMOVIE(Movie&)                 'rewind
            OsErr = FN PREROLLMOVIE(Movie&,0,&1000)           'rate = 1.0
            CALL STARTMOVIE(Movie&)                           'roll 'em
            MovieCT& = 0
          END IF
          
          MovieBlockPtr&.MovieHndl&       = Movie&
          MovieBlockPtr&.MovieController& = MovieCT&
          MovieBlockPtr&.MoviePort&       = CGrafPtr&
          MovieBlockPtr&.MovieResRefNum%  = MovieResRefNum%
          MovieBlockPtr&.MovieFlags%      = Flags%
        END IF
        '
      END IF
      '
    END IF
    '
  END IF
  '
END FN = WindowNumber%
Al Staffieri Jr.