Packagesandy.parser
Classpublic final class Parser

The Parser factory class creates instances of parser classes. The specific parser can be specified in the create method's second parameter.


Example
To parse a 3DS file at runtime:
      var parser:IParser = Parser.create( "/path/to/my/3dsfile.3ds", Parser.3DS );
  



Public Methods
 MethodDefined by
  
create(p_sFile:*, p_sParserType:String = null, p_nScale:Number = 1):IParser
[static] The create method chooses which parser to use.
Parser
Public Constants
 ConstantDefined by
  ASE : String = "ASE"
[static] Parameter that is used to specify that the ASE (ASCII Scene Export) Parser should be used
Parser
  COLLADA : String = "DAE"
[static] Parameter that is used to specify that the COLLADA (COLLAborative Design Activity ) Parser should be used
Parser
  MAX_3DS : String = "3DS"
[static] Parameter that is used to specify that the 3DS (3D Studio) Parser should be used
Parser
Method detail
create()method
public static function create(p_sFile:*, p_sParserType:String = null, p_nScale:Number = 1):IParser

The create method chooses which parser to use. This can be done automatically by looking at the file extension or by passing the parser type String as the second parameter.

Parameters
p_sFile:* — Can be either a string pointing to the location of the file or an instance of an embedded file
 
p_sParserType:String (default = null) — The parser type string
 
p_nScale:Number (default = 1) — The scale factor

Returns
IParser — The parser to be used

Example
To parse a 3DS file at runtime:
       var parser:IParser = Parser.create( "/path/to/my/3dsfile.3ds", Parser.3DS );
   

Constant detail
ASEconstant
public static const ASE:String = "ASE"

Parameter that is used to specify that the ASE (ASCII Scene Export) Parser should be used

COLLADAconstant 
public static const COLLADA:String = "DAE"

Parameter that is used to specify that the COLLADA (COLLAborative Design Activity ) Parser should be used

MAX_3DSconstant 
public static const MAX_3DS:String = "3DS"

Parameter that is used to specify that the 3DS (3D Studio) Parser should be used