Return to Snippet

Revision: 17182
at August 26, 2009 10:40 by Ether


Updated Code
var className:String = 'com.firstrowria.SampleClass';

var classReference:Class = Class(getDefinitionByName(className));


var classInstance:Object = new classReference();


var functionName = 'sampleFunction';
var functionName2 = 'sampleFunctionWithParameter';

classInstance[event.functionName]();
classInstance[event.functionName2]('this is my string parameter');

Revision: 17181
at August 26, 2009 10:38 by Ether


Updated Code
var className:String = �com.firstrowria.SampleClass�;

var classReference:Class = Class(getDefinitionByName(className));


var classInstance:Object = new classReference();


var functionName = �sampleFunction�;
var functionName2 = �sampleFunctionWithParameter�;

classInstance[event.functionName]();
classInstance[event.functionName2](�this is my string parameter�);

Revision: 17180
at August 26, 2009 08:13 by Ether


Updated Code
var className:String = �com.firstrowria.SampleClass�;

var classReference:Class = Class(getDefinitionByName(className));


var classInstance:Object = new classReference();


var functionName = �sampleFunction�;
var functionName2 = �sampleFunctionWithParameter�;

classInstance[event.functionName]();
classInstance[event.functionName2](�this is my string parameter�);

Revision: 17179
at August 26, 2009 08:12 by Ether


Initial Code
var className:String = “com.firstrowria.SampleClass”;

var classReference:Class = Class(getDefinitionByName(className));


var classInstance:Object = new classReference();


var functionName = “sampleFunction”;
var functionName2 = “sampleFunctionWithParameter”;

classInstance[event.functionName]();
classInstance[event.functionName2](”this is my string parameter”);

Initial URL
http://www.firstrowria.com/2008/06/as3-reflection-in-actionscript/

Initial Description

                                

Initial Title
Reflection in ActionScript 3

Initial Tags

                                

Initial Language
ActionScript 3