home products news downloads documentation support gallery online maps resellers search
TNTmips Downloads Menu

HOME

CONTACT US

CURRENT RELEASE
  TNT 2013

DEVELOPMENT VERSION
  TNT 2014

TNTmips Pro
PRIOR RELEASES
  TNT 2012

FREE SOFTWARE
  TNTmips Free
  TNTatlas
  TNTsdk

MORE DOWNLOADS
  HASP Key Driver
  Screen Recorder
  TNT Language Kits
  Sample Geodata
  TNT Scripts

DOCUMENTATION
  TNTmips Tutorials
  Tutorial Datasets
  Technical Guides
  Scripts
  Quick Guides

MORE INFO
  Download FAQs
  FTP
  Download Managers
  Find Reseller

SITE MAP


movie.sml


print("START");

numeric w;
numeric h;
w = 128;
h = 128;

class Color color;
color.red = 100;
color.green = 50;
color.blue = 50;

#Create Frame
print("Create Frame");
class Frame frameB;
frameB = FrameCreate(2*w,2*h);
class Frame frameS;
frameS = FrameCreate(w,h);

#Create GC From Frame
print("Create GC From Frame");
class GC gc;
gc = FrameCreateGC(frameS);
ActivateGC(gc);
SetColor(color);

print("The small frame is", FrameGetHeight(frameS),"x", FrameGetWidth(frameS));
print("The big frame is", FrameGetHeight(frameB),"x", FrameGetWidth(frameB));

# Create Movie
print("Create Movie");
class Movie movie;
movie = MovieInit();

# Set Movie Parameters
print("Set Movie Parameters");
MovieSetFormat(movie,"AVI");
MovieSetFrameRate(movie,"MOVIE_FRAMERATE_24");
MovieSetFrameWidth(movie,2*w);
MovieSetFrameHeight(movie,2*h);

# Make Output File
string ext$;
ext$ = MovieGetFileExt(movie);
string filename$;
filename$ = GetOutputFileName("","Make filename for movie",ext$);
printf("Filename = %s\n",filename$);

numeric numFrames;
numFrames = 5 * 24;

MovieStart(movie,filename$);

# Create the movie duplicating the small frame in the big one 
numeric i;
for i = 1 to (numFrames / 2) {
	SetStatusMessage(sprintf("Processing frame %d of %d",2*i,numFrames));
	FillCircle(w / 2, h / 2, i);
	FrameCopy(frameS,frameB,0,0,w,h,0,0);
	FrameCopy(frameS,frameB,0,0,w,h,w,0);
	FrameCopy(frameS,frameB,0,0,w,h,0,h);
	FrameCopy(frameS,frameB,0,0,w,h,w,h);
	MovieAddFrame(movie,frameB);
	}
MovieStop(movie);
DestroyGC(gc);
MovieExit(movie);
FrameDestroy(frameB);
FrameDestroy(frameS);

print("END");


Back Home ©MicroImages, Inc. 2013 Published in the United States of America
11th Floor - Sharp Tower, 206 South 13th Street, Lincoln NE 68508-2010   USA
Business & Sales: (402)477-9554  Support: (402)477-9562  Fax: (402)477-9559
Business info@microimages.com  Support support@microimages.com  Web webmaster@microimages.com

25 March 2009

page update: 26 May 11