Lesson 5. Using Functions
When programming, you may find yourself using the same chunks of code repeatedlyeither by copying and pasting them or by rewriting the same lines of ActionScript. There is a way to write ActionScript just once and reuse it anytime with a single action. You do this with functions and the action by which you execute a function is a call or a function call. Functions are real time-saversduring both development and code maintenancebecause they reduce the amount of code you need to write or modify.
You will create several functions that allow you to turn a Flash-TV on and off and change its channels. A Flash-TV is a simple Flash app that acts like a TV and remote control.

APPROXIMATE TIMEThis lesson takes approximately one and one half hours to complete.LESSON filesStarting File:Lesson05/Assets/television1.flaCompleted Project:television4.fla