AWD file Issue

Software: Away3D 4.x

O_MEGA, Newbie
Posted: 21 December 2017 02:37 PM   Total Posts: 26

Hi,
I was trying to make an android project(apk)(AIR mobile AS3 app), using Flashdevelop (5.3.0) and AIR_SDK(28)and android sdk ( Revision 23.1.0 (December 2015)), my project uses AWAY3D + minimalcomps and it includes some .awd models ( I made two 3D models in blender then textured them and then imported them in AWAYBuilder and finally exported them as .AWD files) but I recieve the following ERROR!

Error: Error #2032: Stream Error. URL: app:/assets/mymodel.awd
at away3d.loaders::AssetLoader/onRetrievalFailed()[F:\away3d-core-fp11-4.1.6\src\away3d\loaders\AssetLoader.as:521]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at away3d.loaders.misc::SingleFileLoader/handleUrlLoaderError()[F:\away3d-core-fp11-4.1.6\src\away3d\loaders\misc\SingleFileLoader.as:411]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

NOTE: when I make an AS3 project(targeting flash player) everything works fine! and I don’t receive an ERROR!

I hope somebody can help me. I even considered to remake the 3D models!

   

Avatar
Fabrice Closier, Administrator
Posted: 21 December 2017 03:14 PM   Total Posts: 1265   [ # 1 ]

Its an AIR error, it’s simply not found in the app directory. Have you included the directory assets during packaging?

 

   

O_MEGA, Newbie
Posted: 29 December 2017 04:25 PM   Total Posts: 26   [ # 2 ]

Thanks Dear Fabrice, I want to post the solution that worked for me, may be it will help someone as well grin.
At first I was using a piece of code to load my 3D model as below:

var My_Model:Loader3D = new Loader3D();
   
My_Model.load(new URLRequest("../assets/model.awd")); 

and Then after your suggestion I tried to change it this way:

1- In my public class I used below code:

[Embed(source "/../assets/model.awd"mimeType "application/octet-stream")]
private var My_Model_AWDModel:Class; 

2- I changed the code in private function init() like below:

var _awdModel = new Loader3D();
   
_awdModel.loadData(My_Model_AWDmodel()); 

And it worked! (I did it the day I saw your suggestion, but I was lazy to post what worked for me here until now!), Thank u again.

However, I still think my previouse code should worked too, and I don’t understand why it didn’t worked! and as I mentioned before the previous code works when u want to create an swf but it doesn’t work when u want to creat an AIR app.

 

   

Avatar
Fabrice Closier, Administrator
Posted: 29 December 2017 04:44 PM   Total Posts: 1265   [ # 3 ]

good to know you find out…
Note that if you would export your model as AS3 from Prefab, you would not need any loaders. Just import and addChild( new myClass() );

 

   

O_MEGA, Newbie
Posted: 29 December 2017 09:05 PM   Total Posts: 26   [ # 4 ]

Dear Fabrice, how can I positon the lights (Directional lights) exactly as I want?

please find the attachment photo, I can see the position of the directional lights but I am not able to change them! No matter how hard I try.(see the red box the numbers inside the little boxes are not changeable manually. I can change them only when I change the position of the white vector within the sphere below the boxes)

 

   

Avatar
Fabrice Closier, Administrator
Posted: 29 December 2017 09:12 PM   Total Posts: 1265   [ # 5 ]

directional lights have no position. they are just a direction…

As about about to define this in Prefab:
turn the scene with your mouse, like if your eye would be the light.
when you are satisfied, simply press the orientation sphere in light panel.
Clicking in center would be the same direction as the forward vector of the camera. The more you go to the radius of the sphere (the most front representing the hemisphere in front of the camera) allows you to fine tune without changing the point of view with the camera.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X