Skills Review

Sample Solution

Lesson:  Work with actions

  1. Start Flash
  2. Open fl9_5.fla
  3. Save it as FL_C9_SR_skillsdemo9 (your username) to your server folder
  4. Use the playhead to look at all the frames in the movie
    [Hint:  This movie includes three different screens, starting in frames 1, 5, and 10--there are stop actions in frames 4, 9, and 15]
  5. Use the Properties panel to label frame 5 on the title_screens layer seasonChange
  6. Click frame 1 on the Timeline, unlock the buttons layer, select the Start button, then use the Actions panel to create a link to the seasonChange frame when a user clicks the button
    [Hint:  Use the Script Assist feature and the goto action to create the link]
  7. Test the movie
  8. Save your work

Lesson:  Work with targets and movie clip symbols

  1. Unlock all layers, then click frame 5 on the Timeline
  2. Double-click the tree on the Stage, then move the playhead through the Timeline of the movie clip symbol--the movie clip symbol animates the changing seasons
  3. Return to the main Timeline, click the tree, then use the Properties panel to name this instance of the seasons_animated movie clip change
  4. Select the green button to the right of the word "Seasons", then use the Actions panel to add actions that will play the movie clip when a user clicks the button
    [Hint:  This requires a Play command which cannot be inserted using ScriptAssist]
    Type the following directly into the Script pane:
  5. on(release){with(change){play();}}
  6. Use the Auto format and Check syntax features to check your entry
  7. Test the movie, click the Start button to move to the second screen, then click the green button repeatedly
    [Hint:  Each time you click the button, the season changes]
  8. Close the Flash Player window, then save your work

Lesson:  Create interactive movie clip symbols

  1. Click frame 10 on the Timeline
  2. Select the scarf movie clip symbol on the left side of the Stage, then use the Properties panel to name this instance of the scarf movie clip scarf
  3. Select the winter movie clip symbol in the upper-right corner of the screen, then use the Properties panel to name this instance of the winter_graphic movie clip winter_mc
  4. Click the red scarf on the left side of the Stage to select the scarf movie clip, then use the Actions panel to add startDrag and stopDrag actions that allow users to drag the scarf
    [Hint:  Use Script Assist to include an on (press) action with the startDrag action, and after completing the startDrag command, click the closing bracket (}), then continue to specify an on(release) action for the stopDrag]
  5. Use the Actions panel to add an if action to the scarf movie clip symbol that uses _droptarget to test whether the scarf has been placed on top of the movie clip instance named winter_mc
    [Hint:  Turn off Script Assist and insert a blank line below the stopDrag line, then type the code]
  6. Use the Actions panel to add a setProperty action to the scarf movie clip symbol that turns the scarf invisible if it is dropped onto the winter_mc movie clip
    [Hint:  Remember to enclose the action within the closing curly bracket of the on (release) action]
  7. Test the movie, click the More button and drag the scarf to the winter scene, close the Flash Player window, then save your work

Lesson:  Define variables

  1. Click frame 1 on the title_screens layer
  2. Below the "All About Season" title, insert the text 'What is your favorite season?' using these settings:
    Family:  Arial
    Size:  14
    Style:  Bold
    Color:  Black
    Show border around text is deselected (off), then resize the box as needed so the question fits on one line
  3. Directly beneath the text, create an input text field with the variable name mySeason
  4. Click the Show border around text button to select (turn on) this feature
    [Hint:  Be sure to type the variable name in the "Variable" field in the OPTIONS area on the Properties panel, not the Instance Name field]
  5. Click frame 5 on the title_screens layer
  6. Below the "All About Seasons" title, create a dynamic text field with the variable name mySeasonText
    [Hint:  Verify the Show border around text button is deselected; select the Multiline option as the Behavior in the PARAGRAPH area on the Properties panel and change the font size as needed to ensure that all the dynamic text is displayed]
  7. Click frame 1 on the Timeline, select the Start button, then use the Actions panel to create ActionScript which, upon a click of the button, the words 'My Favorite Season is' followed by the season the user typed in the mySeason input field are displayed in the mySeason text dynamic text field
    [Hint:  Be sure to insert the new action before the closing curly bracket of the on (release) action, and to include a space at the end of the "My favorite season is" text]
  8. Test the movie, compare your movie to the Sample Solution
  9. Save your work
    [Hint:  If you do not see all of the text when you test the movie, make the text box larger and then run the test again]
  10. Exit Flash
  11. Post to the Hulk server