Write a function to create a movie where one item is moving from the left to the right and another item is moving from the right to the left.
What will be an ideal response?
```
def movingRectangle4(directory):
for num in range (1 ,30): #29 frames
canvas = makeEmptyPicture (300 ,250)
#add a filled rect moving linearly
addRectFilled(canvas,num*8,0,50,50,red)
addRectFilled(canvas,250-num*8 ,0,50,50,blue)
# Now , write out the frame
# Have to deal with single digit vs. double digit
numStr=str(num)
if num < 10:
writePictureTo ( canvas , directory +"//frame0"+ numStr +".jpg")
if num >= 10:
writePictureTo ( canvas , directory +"//frame"+ numStr +".jpg")
movie = makeMovieFromInitialFile(directory+"//frame00.jpg");
return movie
```
You might also like to view...
The center bracket is sensitive and can produce some unexpected results when you drag it.
Answer the following statement true (T) or false (F)
The data entered into text blocks can be stored in a variable and used in an ActionScript ____.
A. tool B. task C. script D. frame
Sniffers operate at the network layer of the OSI model
Indicate whether the statement is true or false.
Which of the following allows for the hiding of network IPs?
a. PAT b. NAT c. port filtering d. MAC filtering