Create a new movie like the makeSunsetMovie method that turns the beach black after the blue and green is reduced by a passed amount.

What will be an ideal response?

```
*
¤ Method to s l owl y c r e a t e a suns e t and a f t e r
¤ a c e r t a i n amount of r e duc t i on make the p i c t u r e fade
¤ to b l a c k
¤ @param d i r e c t o r y the d i r e c t o r y to wr i t e to
¤/
public void makeSunsetMovie2 ( St r ing di r e c t o r y , double thr e sho ld )
{
// load the p i c t u r e o f the beach
St r ing fName = Fi l eChoos e r . getMediaPath ( "beach¡sma l l e r . jpg " ) ;
Pi c tur e beachP = new Pi c tur e ( fName ) ;
double amountReduction = 1 ;
Pi c tur e blackP = new Pi c tur e ( beachP . getWidth ( ) , beachP . ge tHe ight ( ) ,
Color .BLACK) ;
// d e c l a r e o the r v a r i a b l e s
Pi c tur e temp = nul l ;
FrameSequencer f rameSequencer =
new FrameSequencer ( d i r e c t o r y ) ;
int f ramesPerSec = 3 0 ;
// loop c r e a t i n g the frames
for ( int i = 0 ; i < f ramesPerSec ; i++)
{
temp = new Pi c tur e ( beachP ) ;
amountReduction = amountReduction ¤ 0 . 9 5 ;
i f ( amountReduction < thr e sho ld )
{
temp . modifyTowards ( blackP , i , f ramesPerSec ) ;
}
el se
{
temp . makeSunset ( amountReduction ) ;
}
f rameSequencer . addFrame ( temp ) ;
}
// p lay the movie
f rameSequencer . play ( f ramesPerSec ) ;
}
```

Computer Science & Information Technology

You might also like to view...

When creating a table using the New Excel Spreadsheet command, how does the content display?

A) Embedded Excel worksheet B) Table C) Lotus workbook D) An attached file

Computer Science & Information Technology

The XHTML element used to create a dropdown list is the ________ element

Fill in the blank(s) with correct word

Computer Science & Information Technology