Name of writer: Chris Emmons
Title of Lesson: Buttons and ActionScripting in Macromedia Flash 4
Date of Lesson: TBD
Length of Lesson: 100 minutes (2 50-minute sections)
Description of the class:
Name: Exploring the Internet
Grade level: 7
Honors or regular: elective (mixed)
Source of Lesson: New
ß126.12. Technology Applications (Computer Literacy), Grades 6-8
(C,1,A) demonstrate knowledge and appropriate use of operating systems, software applications, and communication and networking components
(C,1,E) use technology terminology appropriate to the task
(C,1,F) perform basic software application functions including, but not limited to, opening an application program and creating, modifying, printing, and saving documents
(C,1,H) use terminology related to the Internet appropriately including, but not limited to, electronic mail (e-mail), Uniform Resource Locators (URLs), electronic bookmarks, local area networks (LANs), wide area networks (WANs), World Wide Web (WWW) page, and HyperText Markup Language (HTML)
(C,3,E) demonstrate knowledge of the relevancy of technology to future careers, life-long learning, and daily living for individuals of all ages
(C,5,A) identify, create, and use files in various formats such as text, bitmapped/vector graphics, image, video, and audio files
(C,5,B) demonstrate the ability to access, operate, and manipulate information from secondary storage and remote devices including CD-ROM/laser discs and on-line catalogs
(C,5,C) use on-line help and other documentation
(C,7,D) demonstrate proficiency in the use of multimedia authoring programs by creating linear or non-linear projects incorporating text, audio, video, and graphics
(C,11,A) publish information in a variety of ways including, but not limited to, printed copy, monitor display, Internet documents, and video
I. Overview
Using Macromedia Flash 4, students will build upon a previous project. They will create buttons for a movie player and test their functionality. Part II expands on this by adding functionality to the buttons.II. Performance or Learner Outcomes
Student will be able to:
- create a multi-state button that changes depending on mouse position / mouse buttons pressed
- change an object's properties based on user input
- jump to different parts of the movie based on button pressed
- use ActionScripting to track the state of a system
- list uses of ActionScripting for web design
III. Safety Considerations
Students might become addicted to Flash programming and avoid the outside world.IV. Resources, Materials, and Supplies Needed
PC's running Macromedia Flash 4, internet access to read lab document and to access URL's of their choiceV. Supplementary materials, handouts
Lab handout (optional, since it will also be accessible on the intranet), lab files
|
Teacher Does |
Student Does |
|
Engage |
********** |
|
Pull up Windows Media Player and play a sample movie clip on the projector. Push some of the buttons to show how they work. |
Students see firsthand how buttons change the progress / playback of the movie. |
|
Questions |
Expected Student Responses |
|
How many states does the player appear to have? What causes the transitions of the player? |
Students will probably not know what state means in this context. Explain state and draw a finite state machine for the Windows Media Player (simplified). Fill in the transitions which are caused by the button presses. |
|
Evaluate |
Be careful not to lose the students with the FSM. It's a pretty easy concept, but ask questions along the way. Get students to fill in some of the machine. |
|
Explore |
********** |
|
Show the students what they will be doing using the projector connected to the PC. Discuss the states that they will be expected to have in their players. Discuss ActionScripting. Explore the concept of targets and how we tell targets what to do. Show them exactly what you will be looking for as indicated in the lab. Show a final movie player and its different parts. Direct the students to the lab document online. Students should take turns at their PCs, helping eachother along the way. |
The students should understand why we need to have states. They should know exactly what states they should have in their player and which user input causes the transition from state to various state. ActionScripting might not be 100% clear yet. The lab will teach the basics. |
|
Questions |
Expected Student Responses |
|
How many states do you need in your player? How will you keep track of the current state? What causes a transition from the stopped state to the playing state? |
Students _must_ be able to answer these questions to continue successfully. We will have 2 states, one stopped and one playing. The students might ask about the pause state. This is very promising if they do! We will not have a paused state, but this will cause a small 'bug' in our player at the end of the lab. Students will see the need for a paused state later if not now. Students should be able to list which transitions occur from each state and what causes them. |
|
Evaluate |
Hopefully, there will be a nice big discussion on FSM's and the states that we need in the player along with the transitions. Students should have many questions and comments or suggestions. If not, they probably do not have a handle on simple state machines as they should. |
|
Explain |
********** |
|
After each student completes the lab, he / she should have a good understanding about how ActionScripting is done in Flash, and have a very good idea about the simple state machine. Bring up the issue that the Pause button starts playing a stopped movie - not desired behavior. How can we fix this? Add a paused state to the state machine. |
The students should have a firm grasp on the concepts of the FSM and on how ActionScripting works. They are not expected to recall specific ActionScripting commands, but given a list of commands and their function, they should be able to piece together small actions. |
|
Questions |
Expected Student Responses |
|
Why does the player play when you press pause when the player is stopped? How can we fix this? |
The player has an incorrect state machine. We need a paused state. Some students might suggest just checking to see if it is stopped on frame 1 and assume that this is a genuine stopped state. The problem is what if the user happened to pause a playing movie exactly at that frame? All cases must be accounted for. |
|
Evaluate |
Students should be vocal about their ideas. Programming is often a very creative process, and students that enjoy the material will probably have a lot to say. |
|
Extend / Elaborate |
********** |
|
How can we add a repeat button? What changes if any would we have to make to the FSM? How about adding a text display to show the filename being played? |
The students will come up with some ideas for implementing a repeat button. They might suggesting adding states to the state machine. Talk about a better way - just to have one variable dedicated to repeat, and have the transition on the final movie frame stop the movie or go to and play frame 1 depending on the repeat value. Explain why this is better (saves time, space, more efficient). For the filename, students should wonder how they can get the filename. If they don't, pose the question. The solution is through ActionScripting. |
|
Questions |
Expected Student Responses |
|
Ask questions related to the discussion of the repeat and filename display features above. How do we implement them? What changes are required to the current player? |
The students who fully understand the material should have many different ideas. Go through and discuss as many of these ideas as possible explaining each one's pro's and con's. |
|
Evaluate |
Lots of discussion should be occurring here if the students understand the concepts. There are few right or wrong answers to some of the questions raised by discussion, but some solutions are simpler and more elegant than others. |