Slideshow with internal images
The purpose is to create a slideshow with images included in the movie. (But I don't recommend to proceed this way)
We 'll use scripts. I suppose you know how to create simple objects so I will not insist on.
⇒ animation ⇐
Creating Objects
At first, Download a zip file containing 12 images.
Unzip it in a directory.
1 - Set up width 320, height 240, and a background color#66CC66.
Any Frame Rate 'll fit.
2 - Import the whole 12 images in the middle of the scene.
Name them respectively img1, ... , img12. Toggle Target.
3 - Convert each image to Sprite : Menu Modify / Convert / Convert to Sprite.
4 - Create now at the bottom right, a button named Next
You'd yield for instance :
5 - Then create a button at the bottom left. Name it Previous
Outline looks like as follows :
Sprites
In each Timeline of each sprite, set up as mentioned hereafter :
Stop at frame 1 and frame 3 of sprite. Place at frame 2 and Remove at frame 4 of image.
Scripts
Right now, here comes the fundamental part.
1 - In Outline, click Scene_1, then Script, Expert mode in middle zone. Enter the following script :
Explanations :
At loading, variable current is set to 1.
An array of 12 sprites is built.
Then, we go to frame 2 of current sprite, which is img1.
However, at frame 2, Place has been set; therefore image 1 is displayed.
2 - In Outline, click Previous, then Script, Expert mode in middle zone. Enter the following script :
Explanations :
When button Previous is pressed.
If it is not image 1, then we go at frame 4 of current sprite ( = Remove ).
The current image is removed.
We decrement current.
Then, we go to frame 2 of current sprite, which is the previous sprite.
However, at frame 2, Place has been set; therefore the previous image is displayed.
3 - In Outline, click Next, then Script, Expert mode in middle zone. Enter the following script :
Explanations :
When button Next is pressed.
If it is not image 12, then we go at frame 4 of current sprite ( = Remove ).
The current image is removed.
We increment current.
Then, we go to frame 2 of current sprite, which is the following sprite.
However, at frame 2, Place has been set; therefore the following image is displayed.