View Full Version : whats a counter varible and a varible?
youkou-chan
01-16-2009, 05:33 AM
Well, what is a counter varible and a varible in flash?
gconrads
01-17-2009, 02:35 AM
Please question rephrase your. :)
A variable like a bucket, that can hold something.
Variables can be defined by the code author, and a variable can be typed ahead of time to hold a specific type of information.
For example: (simple)
var _age:Number = 5; // is a variable i just made up to hold the data for how old I am
var myAge:Number; // is a variable i made up that I know will be a number.
myAge = _age + 5; // I'm going to define the value of myAge to equal the number 10
var myYears:String = "five"; // a new variable type that holds data as text (Strings) and I spelled out the number 5
A counter? is in your kitchen. HAR!
A counter could mabe be a type of variable. you can define your own classes and set variable to be of that class type.
Example:
import MyStoopidClass; // i made a stoopid class
var _sheeeoot:MyStoopidClass = new MyStoopidClass();
// I made a variable from my own made up class type!
// wacky!
// goodluck, don't suck
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.