Class Name: Passes an object, returns the full name of the class
var loader:urlloader = new Urlloader ();
var classname:string = getqualifiedclassname (loader);
Trace (ClassName); Displays Flash.net.URLLoader
Class name of the parent class: Passing an object, returning the class name of the parent class
var loader:urlloader = new Urlloader ();
var classname:string = getqualifiedsuperclassname (loader);
Trace (ClassName); Displays Flash.events.EventDispatcher
Class by class name
var classreference:class = Class (Getdefinitionbyname ("Flash.net.URLLoader"));
Once you've got a reference to the class, you can do it.
var instance:object = new Classreference ();
Examples of getqualifiedclassname () or getqualifiedsuperclassname () in combination with Getdefinitionbyname ():
var loader:urlloader = new Urlloader ();
var classname:string = getqualifiedclassname (loader);
var classreference:class = Class (Getdefinitionbyname (className));
var instance:object = new Classreference ();
Introspection:describetype () returns the type description of the object
For example:
var loader:urlloader = new Urlloader ();
var description:xml = describetype (loader);
Trace (description);
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.