Author Topic: Embeding/Loading Colladafiles (.dae) using the ResourceManager (Error #1006 )  (Read 63 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 and embeded the .dae file by using following syntax:
Then I use it like this:
Code: [Select]
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;

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!


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. »