One bad thing about not embedding collada and texture files in your swf file is that it can take quite a while for flash to load in external files, even if they’re pretty small.
To embed collada and material files, declare them as a class.
The paths are relative to your flash src file, rather than the deployed swf file.
public class KakesPapervision3DTest extends PaperBase
[Embed(source="dae/blue_ball.dae", mimeType = "application/octet-stream")]
private var daeBlueBall:Class;
private var matBlueBall:Class;
Create your DAE as ByteArray where you initialise your models…
private function init3dModels():void
var byteArray1:ByteArray = new daeBlueBall() as ByteArray;
_model_balls_blue = new DAE();
_model_balls_blue.scale = 100 ;
_model_balls_blue.rotationY = 180;
Use BitmapMaterial instead of BitmapFileMaterial…
private function initMaterials():void
var bitmap1:Bitmap = new matBlueBall() as Bitmap;
var bitmapMaterial1:BitmapMaterial = new BitmapMaterial(bitmap1.bitmapData, true);
Before embedding external files, my scene was taking several seconds to load, even though they were not even 1mb including all the texture files. After embedding dae and jpg/png files, the load time was instant.