okay, i found the problem.

md2.play(new AnimationSequence("run", true, true, 10));
 i didnt recognized the sequence in the md2 has to be named and called
by this name via AnimationSequence.

But no worries - I dont think this will be my last question ;-)

Thanks




On 17 Jun., 15:15, renkster <[email protected]> wrote:
> Hey Fabrice,
>
> thanks for your answer. Would you be so kind to spend me again a bit
> of your time?
>
> My model is loaded correct, also the texture(with some uv-problems,
> but this may be done later)
> But no animation is played.
>
> A short schematic- rundown of what iam trying: Something wrong
> implemented?
>
> Olee
>
> package firstContact
> {
>         public class FirstConatctAway3D extends Sprite
>         {
>                 public var view : View3D;
>                 public var sphere : Sphere;
>
>                 [Embed(source="../../assets/firstContact/
> test_6.md2",mimeType="application/octet-stream")]
>                 public static const BMD2 : Class;
>
>                 [Embed(source="../../assets/firstContact/texture_low.jpg")]
>                 public static var Texture : Class;
>
>                 public function FirstConatctAway3D()
>                 {
>                         initObjects();
>                         addEventListener(Event.ENTER_FRAME, onEnterFrame);
>                 }
>
>                 private function initObjects() : void
>                 {
>
>                         md2 = Md2.parse(BMD2, {ownCanvas:true, name:"torso",
> material:material, back:material});
>                         md2.movePivot((md2.minX + md2.maxX) / 2, (md2.minY + 
> md2.maxY) / 2,
> (md2.minZ + md2.maxZ) / 2);
>                         md2.x = md2.z = 0;
>                         md2.scale(1);
>                         md2.y = 2000;
>                         md2.play(new AnimationSequence("run", true, true, 
> 10));
>                         view.scene.addChild(md2);
>                 }
>
>                 private function onEnterFrame(event : Event) : void
>                 {
>                         md2.rotationY += 1;
>                         view.scene.updateTime();
>                         view.render();
>                 }
>         }
>
> }
>
> On 17 Jun., 13:09, Fabrice3D <[email protected]> wrote:
>
> > Hi Olee,
> > Welcome to Away!
>
> > for your md2, if you do not will make the same md2 url dynamic
> > you indeed can export to as3.
> > Use the Mesh method (the animation export is not yet implemnted in the  
> > as3Exporter class)
> > like this
>
> > myloadedmd2.asAS3Class("Coolname", "coolpackagename", true, true);
>
> > save the clipboard in textapp as Coolname.as
> > then add to your code, import coolpackagename.Coolname;
>
> > var myanim:Coolname = new Coolname();
> > view.scene.addChild(myAnim);
>
> > from now on, "driving the animation is the same for AS3 or md2, same  
> > rule for Animator native class.
> > myAnim.play(new AnimationSequence("run", true, true, 10));
>
> > in your enterframe, add the line
>
> > view.scene.updateTime();
>
> > you have a whole collection of methods, event that can be used, set...
> > this should help you get started. --> read the online doc
>
> > Fabrice
>
> > On Jun 17, 2009, at 12:59 PM, [email protected] wrote:
>
> > > Hi Group,
>
> > > first of all - this is my first project using the away3d library and
> > > iam pretty anticipated to work with it. but unfortunately the
> > > timescale for the project is quite tight so maybe i have to ask some
> > > silly questions instead of enjoing the learning process :-)
>
> > > First thing: i have to animate a character, which is exported from max
> > > as md2 with different animated sequences. the sequences has to be
> > > imported, played and blended over.
>
> > > So far i think the best way is to convert the md2 as as3 - but from
> > > this point iam confused how do i have to use the animation-engine from
> > > away.
> > > Is it just a : instance_of_seq_01.play(),
> > > or do i have to use the AnimationSequence ? (instance.play(new
> > > AnimationSequence("run", true, true, 30)))
>
> > > Is there somewhere a quick rundown which is the best way to do this i
> > > havent seen yet?
> > > Or is somebody willing to push me in the right direction?
>
> > > Thanks in advance,
> > > Olee

Reply via email to