Packagesandy.parser
Classpublic class ColladaParser
InheritanceColladaParser Inheritance AParser Inheritance flash.events.EventDispatcher
ImplementsIParser

Transforms a COLLADA XML Document into Sandy geometries.

Creates a Group as rootnode which appends all geometries it finds. Recommended settings for the COLLADA exporter:


Example
To parse a COLLADA object at runtime:
      var parser:IParser = Parser.create( "/path/to/my/colladafile.dae", Parser.COLLADA );
  

To parse an embedded COLLADA object:
      [Embed( source="/path/to/my/colladafile.dae", mimeType="application/octet-stream" )]
      private var MyCollada:Class;
        ...
        var parser:IParser = Parser.create( new MyCollada(), Parser.COLLADA );
  



Public Properties
 PropertyDefined by
  RELATIVE_TEXTURE_PATH : String
ColladaParser
 InheritedstandardAppearance : Appearance
Set the standard appearance for all the parsed objects.
AParser
Protected Properties
 PropertyDefined by
 Inheritedm_eProgress : ParserEvent
[static]
AParser
 Inheritedm_nScale : Number
AParser
 Inheritedm_oFile : Object
AParser
 Inheritedm_oFileLoader : URLLoader
AParser
 Inheritedm_oGroup : Group
AParser
 Inheritedm_oStandardAppearance : Appearance
AParser
 Inheritedm_sDataFormat : String
AParser
Public Methods
 MethodDefined by
  
ColladaParser(p_sUrl:*, p_nScale:Number)
Creates a new COLLADA parser instance.
ColladaParser
 Inherited
parse():void
Load the file that needs to be parsed.
AParser
Protected Methods
 MethodDefined by
  
parseData(e:Event = null):void
Starts the parsing process
ColladaParser
Protected Constants
 ConstantDefined by
 Inheritedm_oLoader : URLLoader
AParser
Property detail
RELATIVE_TEXTURE_PATHproperty
public var RELATIVE_TEXTURE_PATH:String
Constructor detail
ColladaParser()constructor
public function ColladaParser(p_sUrl:*, p_nScale:Number)

Creates a new COLLADA parser instance.

Parameters
p_sUrl:* — Can be either a string pointing to the location of the COLLADA file or an instance of an embedded COLLADA file
 
p_nScale:Number — The scale factor
Method detail
parseData()method
protected override function parseData(e:Event = null):void

Starts the parsing process

Parameters
e:Event (default = null) — The Event object