Stubborn Parser Error

Software: Away3D 4.x

Avatar
ddddesigns, Jr. Member
Posted: 19 August 2012 11:16 PM   Total Posts: 37

I get the following error.

Error: No parser defined. To enable all parsers for auto-detection, use Parsers.enableAllBundled()
at away3d.loaders::AssetLoader/onRetrievalFailed()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/loaders/AssetLoader.as:423]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at away3d.loaders.misc::SingleFileLoader/parse()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/loaders/misc/SingleFileLoader.as:393]
at away3d.loaders.misc::SingleFileLoader/handleUrlLoaderComplete()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/loaders/misc/SingleFileLoader.as:354]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

In my code, I have this as the FIRST line in my main class.

public class CharacterCreate extends Sprite
 {
  
// SET UP PARSERS
  
Parsers.enableAllBundled(); 

Anyone know how to make it acknowledge the parser?

On another note: robbateman is NOT a user on my computer.  Not sure why the error refers to him.  I downloaded away3D (GOLD) less than a week ago.  FlashDevelop last night, and Adobe player debugger today.

I am also using the SWC.  Is the SWC not ready to be used?

 

   

Avatar
80prozent, Sr. Member
Posted: 20 August 2012 01:10 AM   Total Posts: 430   [ # 1 ]

hi

did you tried the “Intermediate_Head.as” example with your setup?

 

 Signature 

sorry…i hope my actionscript is better than my english…

   

Avatar
ddddesigns, Jr. Member
Posted: 20 August 2012 01:15 AM   Total Posts: 37   [ # 2 ]

Not yet but I definitely will.  Thanks.

 

   

Avatar
ddddesigns, Jr. Member
Posted: 20 August 2012 05:32 AM   Total Posts: 37   [ # 3 ]

80prozent,
I was able to load the head and heavily modify my code to basically use the head in my app.  What I want to ultimately do is switch the character’s gender, face, etc. on a soldier.  The model will remain the same but the textures should change based off one loaded from the server.  I can get the image URL but can’t seem to apply the image to the obj model.  I attached a screenshot for clarification. There seems to be something wrong with the way I am exporting the OBJ from 3DS Max 2013.  I think I need a third party exporter.

 

   

Avatar
80prozent, Sr. Member
Posted: 20 August 2012 05:13 PM   Total Posts: 430   [ # 4 ]

hi

in the intermediate_Head.as example, as far as i can tell no texture is loadet via the obj-file.

all textures seams to be embed in the swf file, so no url-loading of textures is used.

however if you just want to change the texture of the head (e.g. the texture used by the heads material) you could load your texture via a url loader.
once its loadet completly you can assign it to the material.

did you try prefab ? i think you could load the head.obj into prefab and than assign other materials to it, and export as awd2 with embed textures. that should work.

other (and probably best) option would be to export as awd2 directly from 3dsmax, but since i am no max user, i cant tell you if there is a awd2 exporter for max2013.

hope that helps

 

 

 Signature 

sorry…i hope my actionscript is better than my english…

   

Avatar
ddddesigns, Jr. Member
Posted: 21 August 2012 02:35 AM   Total Posts: 37   [ # 5 ]

I’m getting there.  But the problem I have is that the BitmapFileMaterial used to take a string as it’s argument.  Now TextureMaterial which replaces BitmapFileMaterial (correct me if I’m wrong) takes a Testure2DBase.  I can’t seem to figure out how to get my string (url) to TextureMaterial unless TextureMaterial is not the route I am supposed to take.

 

   

Avatar
ddddesigns, Jr. Member
Posted: 21 August 2012 03:13 AM   Total Posts: 37   [ # 6 ]

I finally figured it out.

private function onSkinLoadComplete(event:Event):void
 {
  
// APPLY THE NEW SKIN
  
soldierMaterial = new TextureMaterial(Cast.bitmapTexture(skinLoader));
  
soldierModel.material soldierMaterial;
 
}
  
 
private function updatePreview():void
 {
  
// DETERMINE THE NEW SKIN NAME
  
buildSkinName(); // RETURNS A URL
  
urlRequest = new URLRequest(skinName);
  
skinLoader = new Loader();
  
skinLoader.load(urlRequest);
  
skinLoader.contentLoaderInfo.addEventListener(Event.COMPLETEonSkinLoadComplete);
   
 

Just in case someone else comes across this and it helps them.

 

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X