Home (Spotlight) | TOC
| Products & Ordering | Technical
Info | Contact Zeus
Zeus Tech Note
Using the FixPalette XObject
Copyright © 1996-1997.
Zeus Productions. All Rights Reserved.
Written by Bruce A. Epstein
Q. What is the FixPalette XObject and how do I know if I need it?
A. The FixPalette XObject is needed when using QuickTime movies with more
than one custom palette. If it not used on the PC, nor is it needed if you
are only using one custom palette. If the first QuickTime you play looks
fine, but the second QuickTime video that is played looks funky or
psychedelic, then there is a good chance that the FixPaletet XObject will
solve your problem. Test this by alternating which video you play first.
Q.What fixes the pallette problem on the PC?
A. There is no need for it on the PC. If you are having problems with paletes
on the PC, so TPLE.
Q. Where does the FixPalette XObject belong?
A. Put it in the same folder as yout Mac Projector.
Q. How about some sample code?
A. Call the initPal handler from your StartMovie handler. Call closePal
from your StopMovie handler.
on startMovie
initPal
end
on stopMovie
closePal
end
on initPal
global gFixPalXobj, gMacPlatform
if the platform starts "Mac" then
if objectP(gFixPalXobj) then
alert "You probably either called initPal twice, or forgot to call closePal"
gFixPalXobj (mDispose)
end if
-- Open the XOBJ and instantiate it for use
openxlib the pathname & "FixPaletteXObj"
-- Create an instance of the XOBJ
set gFixPalXobj = FixPalette (mNew, the stageLeft, the stageTop, the stageRight, the stageBottom)
if not objectP(gFixPalXobj) then
alert "Cannot instantiate FixPalette. Make sure FixPaletteXobj is open." && "Error:" && gFixPalXobj
end if
end if
end initPal
on closePal
global gFixPalXobj
-- We only need to do this on the Mac
if the platform starts "Mac" then
-- Dispose of the instance
if objectP(gFixPalXobj) then
gFixPalXobj(mDispose)
end if
-- Close the XOBJ file
closexlib the pathname & "FixPaletteXObj"
end if
end closePal
Call patchPal in the frame before playing the QT movie. Be sure to include
a palette in the palette channel of the frame in which you call patchPal.
(This should match the palette of the QT movie).
on enterFrame
patchPal()
end
on patchPal
global gFixPalXobj
if the platform starts "Mac" then
-- This routine requires that the global variable "gFixPalXobj" be
-- an instance of the FixPaletteXOBJ (we did this in the initPal handler)
if objectP(gFixPalXobj) then
gFixPalXobj(mPatchIt)
else
alert "Cannot patch palette, make sure you've called initPal. gFixPalXobj:" && gFixPalXobj
end if
end if
end patchPal
Home (Spotlight) | Table
of Contents | Links | Contact
Info
Place an Order | Products
for Sale | Licensing | Downloads
TechNotes | FAQs
| E-Mail Zeus | GuestBook
| Glossary
Copyright © 1996-1997. Zeus
Productions. All Rights Reserved.