--macro sharestartput 0 into pacoRefNumif the machineType <>256 then openXlib string(GoUpALevel(the pathName)&"XCMDS")macro locSprite n put (the left of sprite n) into Where put ", "&(the top of sprite n) after Where return Whereend locSpritemacro GetPath whatKind set theFile = fileIO(mNew, "?read", string(whatKind)) if not objectp(theFile) then if theFile = -43 then return "" exit else alert "Sorry, movie couldn't be opened."&return&return &"Error: "&string(theFile) return "" exit end if end if return theFile(mFileName) theFile(mDispose)end GetPathmacro GoUpALevel Path delete char (the number of chars in Path) of Path put (the number of chars in Path) into x repeat while x > 0 if charToNum(char x of Path) = 58 then exit repeat delete char x of Path put x - 1 into x end repeat return Pathend goupalevelmacro GoOtherMovie folderName, moviesName return string(GoUpALevel(the pathName))&string(folderName)&":"&string(moviesName)end goothermoviemacro StartPACO fileName, whereAt, preload, centerglobal pacoRefNum,commandupdatestage when mousedown then nothingput word 1 of fileName&word 2 of fileName&word 3 of fileName&word 4 of fileName&word 5 of fileName into fileNameput (chars(fileName,1,3)&chars(fileName,length(fileName)-3,length(fileName)))&".cv" into filenameif the machineType=256 then startpaco2 (fileName, whereAt, preload)if the machineType=256 then exit put XPlayPACo("openfile",string(GoUpALevel(the pathName))&"PACOS:"&string(fileName)) into pacoRefNum if pacoRefNum contains "error" then exit XPlayPACo("set",pacoRefNum,"posX", integer(value((item 1 of whereAt) + (the stageLeft))),"posY",integer(value((item 2 of whereAt) + (the stageTop))),Â"centering", 0, "loopCount", 1) XPlayPACo("set",pacoRefNum,"clearscreen",0,"nudgeposition",0,"redrawscreen",1, "window",0) if preload = 1 then unload XPlayPACo("allocate",pacoRefNum) XPlayPACo("load",pacoRefNum) end ifplaypacoClosePacoif preload=1 then cursor -1 end ifmacro Startpaco2 fileName, whereAt, preload global pacoRefNum,commandput char 1 of the pathname into driveif preload<>1 then put 0 into preloadput 1 into niput xwin(mnew) into winxput winx(mhwnd) into windowhandleput "playfile"&&drive&":\HCDEMO\DEMO\PACOS\"&chars(fileName,1,length(filename)-2)&"bk"&&"-ctr 0 -posx"&&integer(value((item 1 of whereAt) + (the stageLeft)))&&"-posy"&&integer(value((item 2 of whereAt) + (the stageTop)))&&"-ni "&ni&" -pfd"&&(abs(preload-1))&&"-acm 1 -window"&&windowhandle into commandpaco(mnew,command)put "playfile"&&drive&":\HCDEMO\DEMO\PACOS\"&(fileName)&&"-ctr 0 -posx"&&integer(value((item 1 of whereAt) + (the stageLeft)))&&"-posy"&&integer(value((item 2 of whereAt) + (the stageTop)))&&"-ni "&ni&" -pfd"&&(abs(preload-1))&&"-acm 1 -window"&&-1 into commandpaco(mnew,command)winx(mdispose)exitmacro PLayPACO global pacoRefNum if pacoRefNum contains "error" then exit XPlayPACo("play",pacoRefNum)macro ClosePACO global pacoRefNum if pacoRefNum contains "error" then exit XPlayPACo("set",pacoRefNum,"redrawScreen",0) XPlayPACo("deallocate",pacoRefNum) XPlayPACo("close",pacoRefNum) put 0 into pacoRefNum macro playaiff2 filenameput filename&".wav" into filenamesound playFile 1, string(GoUpALevel(the pathName))&"SFX:DemoSFX:"&string(filename)macro PlayAIFF fileNameglobal path,filenput the pathname into pathput word 1 of fileName&word 2 of fileName&word 3 of fileName&word 4 of fileName&word 5 of fileName into fileNameput (chars(filename,1,7)) into fileName sound playFile 1, string(GoUpALevel(path))&"SFX:DemoSFX:"&string(fileName)end playaiff