7 Replies Latest reply on Nov 3, 2009 1:59 AM by tyree_2

    animation problem

    chrisfasolaki

      Hello, I'm working on a project(3d educational game).I want to add some animations.

       

      I exported the my world from 3ds max everything checked except animations---> member(1)

      I exported the first animation from 3ds max only animations checked---->member(2)    is this right or have I to check more such as "scene hierarchy"?

       

      There is no error in code but when I play the movie I get an error 2147221503 Invalid Parameter

       

      here's the code:

      global world, anim1, ptr

      ....

      ...

      on BeginSprite me

      world = member("world") -- member 1

      anim1 = member("anim1") --member 2
        world.resetWorld()

        member(2).preload()

      end

       

      on exitFrame me
        go to the frame

        ptr = world.cloneModelFromCastmember("anim1", "anim1", member(2))  -- here is the error!!!!
        ptr = world.model("anim1")
        ptr.removemodifier(#keyframeplayer)
        ptr.addmodifier(#keyframeplayer)
        world.cloneMotionFromCastmember("manim", "manim", member(2))

       

        ptr.keyframeplayer.play("manim", 1)

      end

       

      Can anybody Help????

      How can I make it work?