x


Changing the class of a variable

Hi, I've got an instance where I need to change the class of a variable so that it could be one of two classes. How would I do this?

var aVar;
var aNum:int;

if(aNumb == 1)
{
  // aVar gets class 'fish'
}
else if(aNumb == 2)
{
  // aVar gets class 'bird'
}
more ▼

asked Feb 21 '12 at 10:21 PM

treep78 gravatar image

treep78
1 3 6

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x342
x122

asked: Feb 21 '12 at 10:21 PM

Seen: 286 times

Last Updated: Feb 21 '12 at 10:21 PM