Basic Model Viewer Source Code?

Software: Away3D 4.x

Avatar
Majo, Newbie
Posted: 18 September 2012 01:37 PM   Total Posts: 22

Hi everyone,
I have been looking at different 3D-engines for Flash and one of them that I really like is Away 3D. I have been looking at some tutorials, but one thing that I keep gettin stuck on, is my low level of experience with programming. My main activities with Flash involve animation for banners and some basic interactivity, so I hardly have to do any programming beyond gotoAndPlay, counters and stopwatches.

I was wondering if there are any source codes available for a basic 3D Model Viewer. One of the tutorials I tried is http://www.adobe.com/devnet/flashplayer/articles/creating-games-away3d.html , but like the other tutorials it just didn’t work out for me.

Perhaps it is my unfamiliairity with IDK, perhaps it is my inexperience with programming. It is just becoming very frustrating and I really hope someone could perhaps point me to source files in which I only have to change the model and the texture. Or even better, a .fla-file.

   

Mr Margaret Scratcher, Sr. Member
Posted: 18 September 2012 09:16 PM   Total Posts: 344   [ # 1 ]

I can quickly throw you together an example that loads a .obj file.. I’ll post it up over the next couple of days, once I get a few things out of the way.

smile)

 

   

Avatar
Majo, Newbie
Posted: 19 September 2012 06:45 AM   Total Posts: 22   [ # 2 ]
Mr Margaret Scratcher - 18 September 2012 09:16 PM

I can quickly throw you together an example that loads a .obj file.. I’ll post it up over the next couple of days, once I get a few things out of the way.

smile)

That would be really awesome, thank you so much in advance smile

 

   

aeki, Member
Posted: 21 September 2012 08:44 AM   Total Posts: 73   [ # 3 ]

You should have a look at the examples, especially

Basic_View and Basic_Load3DS

 

   

Avatar
Majo, Newbie
Posted: 23 September 2012 09:04 PM   Total Posts: 22   [ # 4 ]
aeki - 21 September 2012 08:44 AM

You should have a look at the examples, especially

Basic_View and Basic_Load3DS


Thanks for the tip smile I did look at them, but I can’t seem to get them to work because they don’t have a .fla. Some of the examples of the older release of Away3D do have a .fla, but they give me all kinds of errors. I am currently using CS6,  so I know it’s not about the wrong version of Flash Player.

Basic_Globe (from the 3.6 examples) for an example gives me 11 errors (see attachment. It used to be 29 though, so I am making some progress). And I have no clue how to fix these, so it would be really nice if someone had an Away3D 4.0 FLA-example, so that I know if it’s because I am using a 3.6 example, or something else entirely.

 

 

   

aeki, Member
Posted: 24 September 2012 07:10 AM   Total Posts: 73   [ # 5 ]

ah sorry, these examples are made to be compiled with Flash Builder or Flash developper. I should advise you to use one of these tools, more powerful to my point of view.

I don’t know how to configue Away3D with flash. From your attachment, all errors come from the fact that Away3D API is not correctly linked to your project.

 

   

Avatar
Majo, Newbie
Posted: 24 September 2012 07:34 AM   Total Posts: 22   [ # 6 ]
aeki - 24 September 2012 07:10 AM

ah sorry, these examples are made to be compiled with Flash Builder or Flash developper. I should advise you to use one of these tools, more powerful to my point of view.

I don’t know how to configue Away3D with flash. From your attachment, all errors come from the fact that Away3D API is not correctly linked to your project.

Well, the errors could be happening because I am using a 3.6-example. I am not sure how much has changed since then. I am pretty sure that the API is linked correctly to the project, because before I added the src-folder to my Source path, I had 29 errors (see attachment)

I tried my hand at Flash Builder and Flash Developper, but I can’t seem to get my head around them. Perhaps I am just too used to Flash Professional, but FB and FD seem sort of counter intuitive, with no timeline and no Ctrl+Enter (Test Scene). That’s the reason why I am looking for a working 4.0 FLA-example, so that I can use that as a template. Or, if someone knows where to find one, a tutorial on how to use Away3D with Flash Professional. According to the book on Away3D, it should be possible.

 

   

aeki, Member
Posted: 24 September 2012 10:16 AM   Total Posts: 73   [ # 7 ]

I am pretty sure that 3.6-examples cannot compile with Away3D 4!

 

   

Avatar
Majo, Newbie
Posted: 24 September 2012 10:32 AM   Total Posts: 22   [ # 8 ]

That explains quite a bit, thanks! I got my code to (sort of) work. I am using a cube-example and it shows a 3D-model now, with some lighting. The example with the vase is something I really can’t get to work, since it keeps throwing a 2030 error at me.

ErrorError #2030: End of file was encountered.
at flash.utils::ByteArray/readBytes()
at away3d.loaders.parsers::AWD2Parser/parseTexture()
at away3d.loaders.parsers::AWD2Parser/parseNextBlock()
at away3d.loaders.parsers::AWD2Parser/proceedParsing()
at away3d.loaders.parsers::ParserBase/onInterval()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick() 

I also found out how to use Adobe Professional for this:
http://www.flashmagazine.com/Tutorials/detail/using_actionscript_projects_in_flex_or_flash/#flash

 

   

aeki, Member
Posted: 25 September 2012 12:29 PM   Total Posts: 73   [ # 9 ]

It seems like a pb with the format of the imput file of the model

Check that the file has the correct format and used with the correct parser

Check also with Prefab that your model loads correctly

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X