by Vivienne Trulock
| sample images | finished movie 1 | finished movie 2 |
Created and designed by Vivienne Trulock for ilikecake, 2005
This exercise shows how to turn the visibility of a sprite on and off. See part 1 movie completed.
Import zone images.
Place the large zone image onto the stage.
Place the smaller 'highlighted' images on the stage so that they cover the large map in the correct place. Be careful here. In order for the illusion to work, the images cannot even be a pixel out.
Use the text window to create the 'Show Colleges', 'Show Green Areas' and 'Show Shops' and 'Ballyfermot Guide' buttons and place them on the stage.
Select all the sprites and make the background transparent in the sprite properties window.
We need to have the highlights 'off' (not visible) at the start of the movie. Assuming the highlighted images are on rows 3 to 10 of the score, place this script into the first frame:
To have the highlights turn 'on' when the user rolls over the 'Show' buttons, we need to put a script on the sprite, that looks something like this, Where 3 and 9 are the rows containing the highlight images we want to make visible
on mouseEnter me
sprite(3).visible=TRUE
sprite(9).visible=TRUE
end
on mouseLeave me
sprite(3).visible=FALSE
sprite(9).visible=FALSE
end
You need to do this for each of the 'Show' buttons, turning on the appropriate rows when needed. The image shows the shops highlighted.
To have the movie loop on the final frame, place this script in that frame:
on exitFrame me
go to the frame
end
If using unusual fonts, import them into the movie using 'Insert > Media Element > Font'.
The final visibility movie should look like this.
This exercise expands on the previous exercise. See finished movie.
Create hotspots of 3 different sizes using the text window, to cover the large green area, the main block and the smaller shops, arts block and green spaces.
Drag them onto the stage, over the appropriate areas, and turn the backgrounds transparent.
Use the text window to write small blurbs about each of the grassy areas, the main and arts block and the shops.
Pull these onto the stage and use the 'Modify/Align' command to align the top and left. They will all sit on top of each other, but as we will only see one at a time it doesn't matter. The stage should look something like this
Modify the script on the first frame to make the blurbs invisible. Assuming that the blurbs are on rows 23, 24,25,and 26, this is the modified script:
Attach the following script to a hotspot to turn the blurb on row 24 (in this case the main block blurb) visible when the mouse goes over that spot and invisible when it leaves.
Create similar scripts for the remaining hotspots, by copying and pasting the above script in the behaviors window, and changing the numbers.
Attach the new scripts to the hotspots, by selecting a hotspot and using the '+' button in the behaviors window to select the script.