I don't know why his example calls LoaderInfo. The DisplayObject class has its own (read-only) loaderinfo property. As long as your main class extends DisplayObject, you can directly call this property
package { import flash.display.Sprite; public class Main extends Sprite { public function Main() { var test1:String = ''; if (this.loaderInfo.parameters.test1 !== undefined) { test1 = this.loaderInfo.parameters.test1; } } } }
From the doc:
Returns a LoaderInfo object containing information about loading the file in which this display object belongs. The loaderInfo property is defined only for the root display object of the SWF file or for the loaded bitmap (not for the Bitmap that is drawn using ActionScript). To find the loaderInfo object associated with a SWF file that contains a display object named myDisplayObject, use myDisplayObject.root.loaderInfo.
source share