Join Joseph Labrecque for an in-depth discussion in this video Functions, part of Learning ActionScript.
In this lesson, we'll have a look at functions within ActionScript. …How they are created. How they are invoked. …And the different properties that can be attributed to them. …A function in an ActionScript is a set of code that preforms a specific task. …And is grouped together to be executed at certain times within a larger program. …So, here we have a basic class and what we're going to do is create a new …function here. So on line 6 we have our Basic …Constructor function. We're going to ignore that for now and go …down a few lines to declare another function.…
So we're going to declare this as a private function. …You can use it to whatever you wantNOISE. …And we use the Keyword function. (NOISE) And we're going to call this, Get Money. …Because it's basically just going to trace out a specific amount of money for us. …And when you create a function your always going to use the opening and …closing parenthesis to declare that. Now we have to put in a return type so a …return type here is simply going to be void.…
- What is ActionScript and why should I learn it?
- ActionScript 2.0 vs. ActionScript 3.0
- Implementing external source code
- Working in Flash Professional and Flash Builder
- Understanding language fundamentals
- Working with ActionScript objects