dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: random animation

  1. #1
    Senior Member
    Join Date
    Dec 2000
    Posts
    200

    Exclamation

    I posted this in the general flash section, but I think I think that this is a better place for it.

    I created an animation that has the following code attached to four random frames of it. (It's 200 frames long.)

    gotoAndPlay (Math.floor(Math.random()*200));

    My question is, can I have flash read the x,y coordinates of the previous position of the movie clip within the animation, so that this random expression doesn't create "jumpcuts". As it is now, the animation is playing along and it jumps to another random position. It looks really weird.

    -cl

  2. #2
    Registered User
    Join Date
    Nov 2000
    Posts
    122
    why no getting the position and moving your thing -

    10pix<thing<+10pix for x axis
    10pix<thing<+10pix for y axis

    if i m understanding u well.....

  3. #3
    Senior Member
    Join Date
    Dec 2000
    Posts
    200

    that's good.

    I'm a little confused about the code example you gave though.

    Could you be a little more specific?

    -cL

  4. #4
    Registered User
    Join Date
    Nov 2000
    Posts
    122
    sorry ...

    it s not code it like a logical process...

    let me see if i get what u mean...

    you ve got a 200 frame long animation
    and u want to make a thing move randomly on your canvas but not jumping from one side of the canvs to the other...you want it to look like "a blind ant just walking around" ... (how did i come up with this????)

    is that right?

  5. #5
    Registered User
    Join Date
    Nov 2000
    Posts
    122
    would it be something like this...

    http://www.onetel.com.au/mani/manisi...ntal/snow.html

    you could have only one moving all directions...(no gravity)

  6. #6
    Senior Member
    Join Date
    Dec 2000
    Posts
    200

    more like...

    the blind ant walking around....

    I'm trying to play with waht you're suggesting. Haven't gotten there yet.

    -cL

  7. #7
    Registered User
    Join Date
    Nov 2000
    Posts
    122
    i ll try to make a flake just go all around...and send u the url....

    maybe this arvo...



  8. #8
    Senior Member
    Join Date
    Dec 2000
    Posts
    200

    cool.

    & accurate code logic. That's what would really help the most. I already have several demos of what I'm trying to do. I'm trying to make bees fly.

    -cL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center