as3exporter

Software: Away3D 3.x

faroer, Newbie
Posted: 18 August 2011 09:02 PM   Total Posts: 18

Hello Away3D community again.

I’m currently trying to convert a 3ds model to an as3 class. But I get an error. When I try. I’ve tried to google for an answer. But so far I can’t find anything on it. So I post here.

I’m using the essential guide to 3d in flash book. And I’m at chapter 4 and the part about converting. The code does the following: Using the loaded 3ds file. put it into the converter and put the output (the as3 class) in the clipboard.

This is the code I use

protected function _onClick(ev:MouseEvent):void
  {
   
var exporter:AS3Exporter = new AS3Exporter();
   
exporter.addEventListener(ExporterEvent.COMPLETE_onComplete);
   
exporter.export(_loader.handle'planetWinter''flash3dbook.common');
  
}
  
  
protected function _onComplete(ev:ExporterEvent):void
  {
   trace
('Export completed');
   
System.setClipboard(ev.data);
  

The _onClick function is getting triggered by a MouseEvent.CLICK eventlistener that is added when the model is loaded.

And this is the error I get

Error: Error #1502: Een script wordt langer uitgevoerd dan de standaardperiode voor een time-out (15 seconden).
at away3d.exporters::AS3Exporter/checkDoubles()
at away3d.exporters::AS3Exporter/write()
at away3d.exporters::AS3Exporter/parse()
at away3d.exporters::AS3Exporter/export()
at planet2/_onClick()

 

   

Richard Olsson, Administrator
Posted: 19 August 2011 06:20 AM   Total Posts: 1192   [ # 1 ]

Sounds like the script is executing for too long, which tells me that there is either a bug, or you are using a very large model. What kind of model are you loading (and exporting again as AS3)?

   

faroer, Newbie
Posted: 19 August 2011 08:20 AM   Total Posts: 18   [ # 2 ]
Richard Olsson - 19 August 2011 06:20 AM

Sounds like the script is executing for too long, which tells me that there is either a bug, or you are using a very large model. What kind of model are you loading (and exporting again as AS3)?

Hello Richard,

Thank you for replying. I’m using a .3ds file exported from 3ds max 2012. There are no textures on it. It’s filesize is 387kb.
I’m using a model I made. Not the monkeymesh that is used in the book.

   

faroer, Newbie
Posted: 22 August 2011 09:04 PM   Total Posts: 18   [ # 3 ]

Bump

I really need some help with this.

   

Avatar
Choons, Sr. Member
Posted: 22 August 2011 09:32 PM   Total Posts: 281   [ # 4 ]

did you try the monkey just to verify that works? Have you tried using your 3ds model directly and verify that works?

   

faroer, Newbie
Posted: 22 August 2011 09:35 PM   Total Posts: 18   [ # 5 ]
Choons - 22 August 2011 09:32 PM

did you try the monkey just to verify that works? Have you tried using your 3ds model directly and verify that works?

I did not try with the monkey yet. Maybe I’m going to try that. The 3ds file is loaded and displayed.


[EDIT]
The monkey is exported to as3 in an instant. Don’t know why my planet does not work. Perhaps it’s the amount of vertexes or faces?

The model has 8066 vertexes and 8192 faces


[EDIT 2]

I think the big amount of vertexes and faces was the problem. I made a model that uses around less vertexes and faces and then it works. Thanks for the help smile

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X