0

Sorry if this is a bit longwinded. I need to model a couple of 3d objects in a separate 3d application, then animate them, import these animations into flash cs3 and then trigger these animations with a mouse. So, for example, a box object will open up when the mouse goes over it (the animation will be triggered by the mouse).

Also, and more complicatedly, I need another object to rotate in the direction the mouse is swiped over it. I figured I'd create about 16 different looping animations in the 3d application, and depending on what direction the cursor moves over the object in flash, it would trigger that particular animation.

As you can probably tell, I'm an animator and don't have a clue about actionscript, if anyone has any advice, I'd hugely appreciate it.

Thanks.

Sambad
  • 1

2 Answers2

0

Well, I'm not sure if there is a shortcut to this question, I guess you need to lookup mouse events and function calls. I'm not sure how much you know about actionscript 3 but for the clicking part you will need something like this:

this.addEventListener(MouseEvent.CLICK, onMouseClick);

This means when you click the mouse the function "onMouseClick" will be called.

private function onMouseClick(e:MouseEvent):void
{
   theNameOfYourAnimationMovieClipInstance.gotoAndPlay("theNameOfTheLabelToPlay");
}

That might not be much but I think you need to specify your question if you want complete solutions. Hope it helps a bit.

  • Thanks very much for the answers, both of you. If I had time I'd explore these avenues, but my deadline is looming, think I'll ask my boss to get a seasoned programmer to help. – Sambad Mar 29 '11 at 09:53
  • That sounds like a good idea if you have a deadline. Good luck! – Andreas Jeansson Mar 29 '11 at 11:16
0

I don't know that you're going to find anyone able to step you through something like this, it's kind of complex.

A good place to start might be here: http://gotoandlearn.com/play.php?id=106 Lee walks you through importing a Collada file into Flash and playing with it. You're going to need a third-party 3D library like Papervision or Away 3D. Depending on your requirements, you may want to dive into the new Molehill APIs - it's still in beta, but it'll give you hardware accelerated 3D and much better performance in flash than anything that's out there now.

Sorry, I know that's not necessarily what you're looking to hear - but this is a really complex subject with any number of ways to achieve your goals, and any number of ways to completely screw it up.

Here, we can help with specific questions or like I've tried to do we can point you into general directions - but it's very difficult to helpfully answer a question like this.

I hope I've given you enough to dive into. Good luck!

Myk
  • 6,205
  • 4
  • 26
  • 33