• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

Flex 3 Variable

How can I declare a variable to hold any type of data. ie. integer of text?
0
deross
Asked:
deross
1 Solution
 
deepanjandasCommented:
var myVar:*;//* represents any data type.

But my suggestion would be using strict data types as far as possible for better coding standards.

Warm Regards
Deepanjan Das
0
 
zzynxSoftware engineerCommented:
var anyType : Object;

Further on - when you know the type for sure - you can cast it to the right type:

var myString : String = anyType as String;
0
 
derossAuthor Commented:
Thank you.  Worked great.

Don
0

Featured Post

Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now