Skip to Content

Flatland Template

Author: Natalie Ebenreuter

 
1

Creating a text hyperlink

 
2

Importing your animation file

 
3

Adding a voiceover file

 
 
 
1

Creating a text hyperlink

 
 


Once you have updated the main text with the section of the text assigned to you, you will need to find a suitable place in your text to add a link to play your animation. To do this click on the font object on the stage and highlight the text you wish to use as a link.

text

With the Text Inspector open type the name of a marker ani1 into the link field.

text inspector

After adding the hyperlink you need to make sure that the text_control behavior is added to the text object. Select the text object and make sure that the sprite overlay shows textcontrol_scipt as seen below. To turn on the sprite overlay go to view/sprite overlay/ show info at the Menu bar at the top of your screen.

text

If the script doesn't appear there it lives in the internal cast and can be added by dropping the script (outlined in blue) onto the text object on the stage.

Internal Cast

You shouldn't need to create the behavior if you are using the template file. However to see what it looks like double click on the textcontrol_script in your Internal Cast to bring up the Behavoir Inspector (shown below).

Behaviour Inspector

To see the actual script click on the icon to bring up the Behavoir script panel (shown below) and that is the textcontrol_script.

Behaviour Script

If you are using the template file the marker ani1 already exists. However for future reference all you would have to do now is create a marker that the movie head (the vertical red line below) will go to once the hyperlink is clicked. From the Menu bar at the top of your screen go to Insert/Marker. Be sure to name it exactly as you did in setting up the hyperlink.

Score

 
2

Importing your animation file

 
 


If you are creating your animation in flash export your file as an swf and be sure that it is a flash player 5 file. In Flash go to File/Publish Settings and check that your settings are as shown below.

flash

If you are importing a video file you must make sure that you export your file from the program you used to create it as an .mov or .avi file that uses sorrenson compression.

To import a file into Director go to File/Import at the Menu bar at the top of your screen. If importing an .mov or .avi file you will need to add your file with the Link to External File option displayed on the drop down menu at the bottom of the import panel. You need to keep your .mov or .avi file in the same position so that director can locate this file again when playing back on another computer. This is not necessary for an .swf file, a standard import is fine. Then click
import.

Import Files

All that is left is to position your animation on the stage and make sure that the beginning of your animation sprite in the score is in line with your marker and the stop frame action in the script channel above.

 
3

Adding a voiceover file

 
 


Your voice over sound file can be a .wav .aif or .aiff file to be imported as a standard import. Once it is safely in the Internal Cast it is very important to name your sound file Audio via the text field at the top of the cast for the button script to work. Select the sound member shown below highlighted in blue and type Audio in the field at the top of the Internal Cast pannel.

Internal cast

If your are using the template file you will need to make sure the Voiceover_pic graphic has the Voiceover_script behavior attached to it. Select the Voiceover_pic graphic and make sure that the sprite overlay shows Voiceover_script as seen below.

voice over

To enable your sound file to play you will need to modify the Voiceover_script as the template file doesn’t include the play sound function. Click on the little yellow behavoir symbol at the bottom of the Sprite Overlay (shown above) and take a look at your Property Inspector (shown below).

property inspector

In the Property inspector panel click on the icon to view the Voiceover_script which will bring up the Behavior script panel shown below.

behavious script

This script creates a mouse over button but we need to play the sound as well. Copy and paste the text below in to the Voiceover_script.

on mouseEnter me
cursor 280
set the blend of sprite the currentspritenum = 100
end

on mouseLeave me
set the blend of sprite the currentspritenum = 50
cursor -1
end

on mouseDown me
-- plays audio in the 2nd sound channel
--Be sure to name your sound Audio in the property inspector
puppetSound 2, member "Audio"
end


Your new Voiceover_script should like something like this

Behaviour Script

In doing this you have just added a puppetSound script that will play your Audio sound file in sound channel 2 when a user clicks on the sound button. You may like to create a stop sound button as well. To do this you will need to create a no sound button. The easiest way to do this is to copy the Voiceover_pic graphic in your internal cast and delete the sound waves.

Double click on the Voiceover_pic graphic in your internal cast to bring up the Paint window shown below.

paint

Use the marquee tool to select the graphic and copy it (control or command c)

paint

Then click on + to add a new graphic and paste (contorol or command v) it into the paint panel. In the text field at the top of the Paint Pannel type in stop_sound.

paint

Now it is time to create a stop_sound behavior. To do this you will need to go to Window/Script at the Menu bar at the top of your screen to bring up the Behavior script panel. Copy and paste the text below in to the behavior panel and name the behavoir stop_sound in the field at the top of the behavoir panel.

on mouseEnter me
cursor 280
set the blend of sprite the currentspritenum = 100

end
on mouseLeave me
set the blend of sprite the currentspritenum = 50
cursor -1
end

on mouseDown me
puppetSound 2, 0 --turns off the button sound
end


Your new stop_sound behavior should look something like this

behaviour Script

All that is left to do it to attach the stop_sound behavior to your stop_sound graphic. Place the stop_sound graphic on the stage and position it beside the play voiceover graphic. You may want to place some text next to the button like stop voiceover.

To make the graphic appear the same as the play graphic you will need to change the opacity of the graphic on the stage. Select the stop_sound graphic and take a look at the sprite overlay. It should look like this.

voice over

Click on the little red i symbol and take a look at your Property Inspector. In the Property inspector panel you will need to change the dropdown menu next to the % sign to 50 as shown below.

property inspector

To attach the behavoir to the stop_sound graphic, you will need to select the stop_sound graphic on the stage and you will notice that your sprite overlay will look like this

voice over

Click on the little yellow behavoir symbol and take a look at your Property Inspector. In the Property inspector panel click on the the Behavior Popup icon and select “stop_sound” from the drop down menu.

property inspector

property inspector

When you return to the stage and select the stop_sound graphic your sprite overlay sould show that the sound_toggle behavior is now attached to the stop_sound graphic.

voice over

To download the template file with a play sound and stop sound button click here.

All that is left to do is add your student name and number to the lower right hand side text and update the forward and backward arrows to link your file to the complete flatland file.

To change the previous and next files that your file will be positioned between, go to Window/Script at the Menu bar at the top of your screen and you will see the Behavior script panel shown below.

back script

Using the two arrow buttons at the top left hand corner of the panel you can search for back_scritp to change the file preceding your file will link to. As shown above, the text you need to change is highlighted. Also do this for the forward_ script and you are done.

bulletBack


Share

Like this? Click a link below to share it...


Subscribe and Download

Subscribe to the Swinburne Faculty of Design Podcasts

Post a comment

Garbage posts and SPAM will be deleted.

* Name:
* Email: (will not be made public)
* Comment:
* Reply Notification: