Thanks for that Fabrice.

I really look forward to Prefab supporting animated MD2s. :)
In the meantime I'll play around with the code that you uploaded.
Presently I embed my Md2 files as I want the finished Swf to be a
stand-alone application.
But, of course, converting the Md2s to Classes would achieve the same
results and reduce the size of the Swf.
I guess the only downside might be a higher demand on the CPU? (not a
great issue I don't think)

Cheers


D

On Mar 28, 1:46 am, Fabrice3D <[email protected]> wrote:
> will be soon implemented in Prefab (more efficiently in terms of verbose), 
> but for now, if you make a simple load md2 in away, and save the trace as AS3.
>
> that would be in your case something like
> trace((loader.handle as Mesh).asAS3Class("MyMd2", "anims", true, true):
> copy the debug trace, and save in text editor using same classname "MyMd2.as";
>
> once you import this class
>
> var myAnim:MyMd2 = new MyMd2();
> myAnim.material = somematerial;
> scene.addChild(myAnim);
> myAnim.play(...);
>
> Look in uploads on google group, I recall Peter uploaded a little swf that 
> does it for you...
>
> Fabrice
>
> On Mar 27, 2010, at 1:25 PM, dapdap wrote:
>
> > Hi,
>
> > Thanks for that Jerome,
>
> > Correct me if I'm wrong but I don't think you can import or export
> > animated Md2 files in Prefab?
> > (hopefully a future feature!!)
>
> > I'm making some progress using Sprite3ds which in itself is an amazing
> > Away3d feature. I'm sure I'll get it working how I want fairly soon.
>
> > D
>
> > On Mar 27, 12:26 pm, elguapoloco
> > <[email protected]> wrote:
> >> I am not sure of how your project is setup, but have a look at prefab
> >> and exporting an AS Class of your model. Once in flash, you can expose
> >> some of the functions in the generated class to control materials and
> >> use some thing like:
>
> >> var bird:Bird  = new Bird();
> >> bird.applyMaterial(myMaterial);
>
> >> IMHO, this is the way to go if you want to use run-time materials on a
> >> mesh. The actual mesh are usually small and once in AS they are
> >> compressed with the rest of the code. Yesterday, I converted 3 DAE
> >> file at about 90kb each to 3 AS Classes. Once implemented in my
> >> project, I didn't see a difference in the final swf file size!... Ok,
> >> maybe .4kb or so :)
>
> >> I exposed the meshes array, generated color materials and added mouse
> >> interactions on some of the parts to act as a navigation. I <3 prefab!
>
> >> Cheers,
>
> >> Jerome.
>
> >> And yes, I know, I owe you many beers Fabrice!
>
> > To unsubscribe from this group, send email to 
> > away3d-dev+unsubscribegooglegroups.com or reply to this email with the 
> > words "REMOVE ME" as the subject.

To unsubscribe from this group, send email to 
away3d-dev+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to