Away3d Flash CS5: 1046: TextureBase not found

Software: Away3D 4.x

bauervision, Newbie
Posted: 17 November 2011 02:04 PM   Total Posts: 25

I recently “installed” Away3d for Flash as directed here:
http://www.flashmagazine.com/Tutorials/detail/create_the_earth_and_heavens_in_less_than_an_hour_with_away3d/

Basically I copied the ‘away3d’ and ‘com’ folders into my project folder (nochump didn’t exist—I guess this was fixed with the latest update). Built and saved my flash file into that same folder and made sure it was AS3.

Upon testing I get an error thrown in RenderBase.as, line 212.
“1046: Type not found or was not a compile-time constant: TextureBase”

When doing this tutorial in FlashBuilder…
http://www.adobe.com/devnet/flashplayer/articles/creating-games-away3d.html

...everything works fine.

But trying to come out of Flash, no luck.

I’m sure I’m missing something simple. Thanks in advance!

Win7, 64 bit

 

   

Avatar
maddog, Sr. Member
Posted: 17 November 2011 03:15 PM   Total Posts: 118   [ # 1 ]

flashcs5 exports to flash player 10. You need to set it up to export to flash player 11 to use Away3d 4. Here is a tutorial.

http://videometry.blogspot.com/2011/07/setting-up-cs5-and-cs55-to-target-flash.html

 

   

bauervision, Newbie
Posted: 17 November 2011 03:46 PM   Total Posts: 25   [ # 2 ]

Thanks for that!

But now I have 6 new errors…. :/

Basically it looks as though Flash can’t find any of the libraries now.

1172: Definition away3d.core.utils:Cast could not be found
1046: Type not found….
1180: undefined method…
1118: unrelated type….

 

   

bauervision, Newbie
Posted: 17 November 2011 04:53 PM   Total Posts: 25   [ # 3 ]

So I noticed that inside of the away3d folder, inside of ‘core’, there is no folder ‘utils’ and therefore there is no Cast to import.

I’m guessing that might not be a good thing….

 

   

bauervision, Newbie
Posted: 17 November 2011 05:03 PM   Total Posts: 25   [ # 4 ]

okay, so apparently the Alpha version of Away3d 4, doesn’t have the utils folder.

switched to version 3.6 and the errors are now gone. But still doesn’t work.

 

   

Avatar
maddog, Sr. Member
Posted: 17 November 2011 07:36 PM   Total Posts: 118   [ # 5 ]

try using latest examples from. With away3d 4x
https://github.com/away3d/ make sure you set flash to export to 11 in publish settings and hit f12 to preview in browser.

The tutorial above is really old so you may have to go to an even older version of away3d to get it to work.
Are you just trying to learn away3d or do you have something you want to build?

 

 

   

bauervision, Newbie
Posted: 18 November 2011 01:07 PM   Total Posts: 25   [ # 6 ]

Honestly I’m just trying to load a 3d model into a swf for a prototype app at work. The earth example was perfect, those are the kind of controls I’m looking for.

If I can get this to work, then I’ll be looking for more controls, of course, as this would primarily be used as a part task trainer kind deal.

For example, examining the parts of a camera, how to troubleshoot it, etc.

I like what I see from it so far, so I’m interested in learning it in the long run. If I can just past these noob obstacles.

 

   

Avatar
maddog, Sr. Member
Posted: 18 November 2011 04:53 PM   Total Posts: 118   [ # 7 ]

Here i simplified a loader for models no lights or shadows
Built in flash cs5 with flash 11
make sure to hit F12 to render to browser.

 

   

bauervision, Newbie
Posted: 18 November 2011 04:55 PM   Total Posts: 25   [ # 8 ]

maddog, I switched back to version 4 of A3D, and would love to try those examples, but there aren’t any FLA’s to load and test.

When I run the html files, nothing loads.

Not sure what to try next….

 

   

Avatar
maddog, Sr. Member
Posted: 18 November 2011 04:59 PM   Total Posts: 118   [ # 9 ]

try the loader i just sent.

The examples that are in gethub you just need to make a new flash file then set the .as file as main class then render it.

you may get a notice to update or varify flex location don’t change location but click okto confirm it, don’t click cancel. This pops up because actionscript is using some flex code.

 

   

bauervision, Newbie
Posted: 18 November 2011 05:08 PM   Total Posts: 25   [ # 10 ]

thanks for that!

errors:

1046: Type not found, MouseEvent3d and AssetEvent.

I added the A3D Source path in Publish settings and it cleared those errors, then left me with this one

1172: Definition com.greensock:TweenNano could not be found

commented that line out

works!

awesome thank you!

Now, to incorporate this into my swf….fingers crossed.

 

   

Avatar
maddog, Sr. Member
Posted: 18 November 2011 05:15 PM   Total Posts: 118   [ # 11 ]

Sorry about that.(com.greensock:TweenNano)
That is for doing smooth transitions, with the 3d models and other stuff.

example.
TweenNano.to(cameraController, 2, { panAngle:80, tiltAngle:20 });
rotate camera on model to the pan and tilt angle

 

   

bauervision, Newbie
Posted: 18 November 2011 05:56 PM   Total Posts: 25   [ # 12 ]

ugh.

So I got your file running.

I copy everything into the folder I’m currently working in, and it stops working. Folder structure is exactly the same as it was except now the embed and src folders are inside my folder, not your Simple Loader folder.

I don’t personally care what folder this thing is in, it just needs to eventually be inside of my projects root folder.
—————————————————————————-

Well I placed it inside of my project folder, and it runs of course, except when I run it from the main html which needs to load the swf containing the model.  Then its back to nothing….

—————————————————————————-

ugh

 

   

Avatar
maddog, Sr. Member
Posted: 18 November 2011 06:15 PM   Total Posts: 118   [ # 13 ]

you should just need to update the path to model and texture in the simpleloader.as.  Not sure whats going because I don’t know how you have things structured with your project.

 

   

bauervision, Newbie
Posted: 18 November 2011 06:25 PM   Total Posts: 25   [ # 14 ]

paths are the same, the only thing I did was place your Simple Loader folder inside my project folder, then in my main html that needs to load the swfs, I point down to your simpleLoader.swf

 

   

Avatar
maddog, Sr. Member
Posted: 18 November 2011 08:20 PM   Total Posts: 118   [ # 15 ]

Here try this one I reverted back to away3d 3.6 and flash 10
note. materiel is in library and is set as a class
also model is loaded externally every time not embed like in away4

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X