NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Technical Q&A AMTPE11
Panning Media under a Window


The Apple Media Tool and Apple Media Tool Programming Environment products have been discontinued. For more information check out: AMT/PE Discontinued.

Q: I have a PICT for which I want to show different regions at different times (as for a flipbook animation). How do I do this in AML?

A: The following example moves an object's media right and down by deltaX, deltaY pixels without changing the actual location or size of the "window" to the media.

object foo is MEDIAHANDLER
has
    PanMedia(deltaX, deltaY)
        do
            self.target.X := self.target.X + deltaX;
            self.target.Y := self.target.Y + deltaY;
            self.InvalidateAll();
               self.target.UpdateFocus();
        end;
end;

[Aug 01 1995]


Developer Documentation | Technical Notes | Development Kits | Sample Code