AS3 string to class name getDefinitionByName


/ Published in: ActionScript 3
Save to your folder(s)

libraryPath is a string


Copy this code and paste it in your HTML
  1. import flash.utils.getDefinitionByName;
  2.  
  3. var CLASSNAME:Class = Class(getDefinitionByName(String(libraryPath)));
  4. GRAPHIC = new CLASSNAME();

Report this snippet


Comments


You need to login to view comments.