Author Topic: Embeding/Loading Colladafiles (.dae) using the ResourceManager (Error #1006 )  (Read 141 times)

Hello everyone!
I use the Flare3d sdk in FlashDevelop to realise a swf application which shall be able to load variing collada files into a Viewer3D.
While embeding the Colladafile manually and loading it with the ColladaLoader the test runs just fine.
But I have an issue while loading a Colladafile embeded in a .property-file using the ColladaLoader.
First of all I created a .property file (named metadata.properties) and embeded the .dae file by using following syntax:
Model_1=Embed(source="../localpath/example.dae",mimeType="application/octet-stream")
Then I use it like this:
Code: [Select]
[ResourceBundle("metadata")]
public class Main extends Sprite
{
[...]
            public function Main():void
{
var rm:IResourceManager = ResourceManager.getInstance();
rm.localeChain = ['properties'];
for ( i = 0; i <= 6; i++){
var file:ColladaLoader = new ColladaLoader(XML(rm.getClass('properties', 'Model_' + i)), null, scene, "", false, Context3DTriangleFace.BACK);
obj = new Pivot3D();

file.parent = scene;

file.load();
         }
[...]
    }
}
At the moment I'm loading 6 Models,later it's meant to be a variing amount of nearly random Colladafiles. Thats why I tried solving it with the ResourceManager,so i can simply change the properties before compiling.
Now when I test-run the project I get an "TypeError: Error #1006: value is not a function."
for the load()-function of the ColladaLoader.
So I would like to ask wether it is even possible to embed .dae-files using the ResourceManager this way. I feel like I'm giving false input for the ColladaLoader constructor but I don't know how exactly...
I hope somebody can help me.

Thanks in advance!

Hans

[EDIT]
Just found out the
Code: [Select]
rm.getClass('properties', 'Model_' + i)
returns null so it's not a problem with the flare3d sdk at all! Propably I did something wrong with the properties. Maybe there is still someone out there who'll help me to figure out how to use the ResourceManager correctly.^^
« Last Edit: October 03, 2017, 06:19:22 AM by H. G. »

Tags: