Create a movie with text in a ticker tape moving up from the bottom of the picture to the top.
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 bottom t o t o p
? @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 makeTickerTapeMovieBotTop ( 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 , 190 ? ( 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 version of Simple Network Management Protocol (SNMP) is considered the most secure?
a. SNMPv2 b. SNMPv3 c. SNMPv4 d.SNMPv5
Which of the following is NOT true about Visual Basic functions?
A) Explicit functions are predefined functions in Visual Basic. B) A function procedure begins with "Function" and ends with "End Function." C) A procedure that calls a function is called the calling procedure. D) Function procedures perform an action and return a value.