Create a movie that has the text in a ticker tape moving diagonally from top left to bottom right.
What will be an ideal response?
```
/? ?
? Method t o c r e a t e a t i c k e r t a p e movie t h a t moves
? from t o p l e f t t o bottom r i g h t
? @param d i r e c t o r y t h e d i r e c t o r y t o w r i t e t o
? @param message t h e s t r i n g t o d i s p l a y
?/
public void makeTickerTapeMovieTopBot ( S t r i n g d i r e c t o r y ,
S t r i n g message )
{
int framesPerSec = 3 0 ;
P i c t u r e p = null ;
G r a p h i c s g = null ;
FrameSequencer f r a m e S e q u e n c e r =
new FrameSequencer ( d i r e c t o r y ) ;
Font f o n t = new Font ( ” A r i a l ” , Font .BOLD, 2 4 ) ;
// l o o p f o r 2 s e c o n d s o f a n i m a t i o n
f o r ( i n t i = 0 ; i < f r a m e s P e r S e c ? 2 ; i ++)
{
// draw t h e s t r i n g
p = new P i c t u r e ( 3 0 0 , 2 0 0 ) ;
g = p . getGraphics ( ) ;
g . s e t C o l o r ( C o l o r .BLACK) ;
g . setFont ( font ) ;
g . d r a w S t r i n g ( message , 1 0 + ( i ? 2 ) , 10 + ( i ? 2 ) ) ;
// add frame t o s e q u e n c e r
f r a m e S e q u e n c e r . addFrame ( p ) ;
}
// p l a y t h e movie
frameSequencer . play ( framesPerSec ) ;
}
```
You might also like to view...
Which of the following commands can be used to obtain a hash of the original drive and the forensic copy?
a. dd b. netcat c. md5sum d. nc
What is the purpose of a preloader in Flash?
What will be an ideal response?