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...
What are the advantages of ambiguous organizational schemes?
What will be an ideal response?
Modify the spreadsheet for Paying Off a Loan. Change it so you can enter the interest in a cell and have the cell in your formula. Test it to see how changes in the interest rate affect your ability to repay the loan.
What will be an ideal response?
You apply a(n) shape tween to a symbol by placing an instance in the starting keyframe, and then modifying the position or transformation properties of the instance in the last keyframe of the animation.
Answer the following statement true (T) or false (F)
The following is an example of a recursive function, where nextNum is a function such that nextNum(x) = x + 1.int recFunc(int x){ return nextNum(nextNum(x));}
Answer the following statement true (T) or false (F)