how can I load obj and jpg with parameter name?

Software: Away3D 4.x

skahandz, Newbie
Posted: 28 November 2012 06:03 AM   Total Posts: 7

first, sorry for my english

how can i load objfile use swf parameter?


my 3d obj loader is “load3d.swf” and i wrote “load3d.swf?obj=aa.obj”

and it’s my code

public var obj:String;
.
.
[Embed(source=“obj”, mimeType=“application/octet-stream”)]
private var Model:Class;
.
.

it doesn’t work, is it possible?

thanks to read

   

Avatar
Fabrice Closier, Administrator
Posted: 28 November 2012 09:49 AM   Total Posts: 1265   [ # 1 ]

I think you do mix a bit of everything here…

If you use flashvars, which is what you do by doing swf?adress_to_externalfile
then you need to check the loaderinfo content, load the external file associated with the url that you define here as “aa.obj”, and “read” it once its fully loaded using one of the parsers in Away. If you embed, you need to parse this data too. Take a look at the Away examples/tutorials section.

Note that both ways are not specific to the engine, these are native Actionscript methods to load/embed/read external files. You should look at AS3 doc, google a bit, there are many examples/tutorials online on the subject…

   

skahandz, Newbie
Posted: 28 November 2012 11:41 AM   Total Posts: 7   [ # 2 ]

thanks!

i’ll do that

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X