A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: smooth action

  1. #1

    smooth action

    Hi I was wondering how i could get my ball moving smoothly, I posted something similar a few days ago but nothing has been resolved.
    What it is that I want is to get the ball moving faster by just setting the speed to just 1, I know about the fps but thats not what I'm looking for. Thanks...

  2. #2
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    did you resolve the slowdown/bounce issue? are you referring to a different thread?

    and if you want to get smooth movement without adjusting FPS im sorry but i cant be done. unless you mean something else, in which case you are going to have to explain a little better, prefereably post something(a FLA, SWF) and use it as a reference to what you mean.
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  3. #3
    Senior Member lapo73's Avatar
    Join Date
    Jun 2003
    Location
    italy
    Posts
    395
    A nice trick to have one or more items on the screen moving very smoothly is by using the setInterval command, available in Flash MX and subsequent.

    The setInterval function (see more details in the internal Flash help) allows you to call another function at a given time interval expressed in ms.

    The great news is that by doing so you can have multiple objects moving on stage at different speeds, regardless the current fps of the SWF. In other words if you setup a setInterval every 10ms so that it calls a function that moves an object by 1 pixel at a time, you're running the animation of that object at 1000 / 10 = 100 fps, which should look very smooth.

    I think this technique has a great potential to fine tune animations in Flash!


    Lapo
    www.gotoandplay.it
    Flash game developers community
    www.smartfoxserver.com
    Multiplayer Flash Server

  4. #4
    Thanks guys for the help...

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