Flash - random motion and rotation - Actionscript 2

Date: 9th April 2008 at 11:32 am | Filed under: actionscript, development, flash | Author: Sam Burdge

Back again, my pet tadpoles (they still haven't grown into frogs yet!). This time I am going to explain the actionscript that makes them move, turn and run from the mouse. Firstly, heres an example of what they do (move your mouse over them and watch 'em swim away): Read on…

4 Responses to “Flash - random motion and rotation - Actionscript 2”

  • Comment by Sherry
    Date: April 9th, 2008 at 5:14 pm

    This is very cool, thank you for sharing. I can't wait to try it :-)

  • Comment by sherry
    Date: April 10th, 2008 at 8:55 pm

    Hi, I tried this out and am having trouble getting it to work. Am I supposed to have 2 different layers, one for tadpole and one for mouse_mc? Also, my transparent pixels don't seem to be attached to my mouse…

  • Comment by Sam Burdge
    Date: April 12th, 2008 at 11:04 pm

    Hi Sherry

    They can be on separate layers, or both the same layer, it shouldn’t matter. Did you give the movie clips instance names in the ‘properties’ panel?

    Sam

  • Comment by bex
    Date: August 12th, 2008 at 2:10 pm

    Hi there, just wondering if you’d have an tips on converting this to AS3. I’m very new to Flash and have been trying to do it all day!

    Thanks in advance,

    bex.

Leave a Comment

Tadpoles - Basic Survival Training

Date: 21st November 2007 at 12:26 am | Filed under: actionscript, blog, flash, gallery | Author: Sam Burdge

I have given my tadpoles their first lesson in survival, they now know how to run away from danger! Previously they had two basic behaviours:

  1. To face toward the direction in which they are moving.
  2. To stay within the confines of the tank.

They now have a third behaviour which is to move away from the mouse when you move it over them. If they get stuck under the mouse they wriggle around until they can get free!

Leave a Comment

Tadpoles

Date: 6th November 2007 at 2:58 am | Filed under: actionscript, blog, flash, gallery | Author: Sam Burdge

Introducing my new pet tadpoles! Over the coming weeks I intend to train them to do things...like make tea, or write PHP. They're not very evolved yet though, just swimming around blindly.

Leave a Comment