A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: Moving objects are "distorted"

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    21

    Exclamation Moving objects are "distorted"

    This one is done with actionscript, but exactly the same happens with motion tween.

    I cannot really explain this, so I recorded a video about it.

    Sorry about the bad quality, for some reason camstudio failed to capture the problem properly, so I had to use a camera. The faster the objects move, the more they are distorted (It is NOT the camera causing that!)

    www. youtube.com/watch?v=bFU1HLysQQM

    Last edited by Timppa; 07-15-2011 at 12:41 PM.

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Could you send the .SWF file of that file? I can check if the same issue is appearing here
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Senior Member
    Join Date
    Jun 2003
    Location
    Kent, WA
    Posts
    536
    Do you have some code? I haven't seen it do that before. You aren't doing any weird bitmap manipulations or anything are you?

  4. #4
    Junior Member
    Join Date
    Jul 2011
    Posts
    21
    Like I mentioned, the same happens if I create a new project, create a simple box and motion tween it moving quickly. No bitmaps, etc done.

    The actionscript is really simple (running 60FPS):

    Actionscript Code:
    player.xSpeed = 0
    player.ySpeed = 0

    player.onEnterFrame = function(){

    if(Key.isDown(Key.UP)){
        player.ySpeed -= 1
    }
    if(Key.isDown(Key.DOWN)){
        player.ySpeed += 1
    }
    if(Key.isDown(Key.LEFT)){
        player.xSpeed -= 1
    }
    if(Key.isDown(Key.RIGHT)){
        player.xSpeed += 1
    }

    player._x += player.xSpeed
    player._y += player.ySpeed

    }

    Download link (includes the source and .swf files)

    I just noticed something: The larger the FPS setting is, the easier this is to notice!
    I have mostly been using 60 FPS like in the video. It is also the refresh rate of my screen.

    EDIT: Oh, and the Flash version is CS5.5, forgot to mention.
    Last edited by Timppa; 07-16-2011 at 08:49 AM.

  5. #5
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Nothing wrong here - I think it's your Monitor, if you're using a Laptop - might be something wrong with your drivers or something! On my older laptop, suddenly one day, my screen started to flicker when my laptop got too hot, the refresh rate was dropping!
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  6. #6
    Junior Member
    Join Date
    Jul 2011
    Posts
    21
    Quote Originally Posted by Nig 13 View Post
    Nothing wrong here - I think it's your Monitor, if you're using a Laptop - might be something wrong with your drivers or something! On my older laptop, suddenly one day, my screen started to flicker when my laptop got too hot, the refresh rate was dropping!
    Very possible. It is just that haven't experienced anything like this with any other flash games or animations.

    My laptop should be able to run stuff like that properly. I recently formated it and haven't updated my drivers yet, so I guess that is the next step.

  7. #7
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Well, could you save those files in CS4 version? I don't have CS5.5 xD
    Maybe there is something wrong after all with those files, or maybe your version of Flash :P
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  8. #8
    Senior Member
    Join Date
    Jun 2003
    Location
    Kent, WA
    Posts
    536
    Don't think it's your laptop. I see it on my system as well, and I'm running a fairly beefy PC with a 24" display @ 1920 x 1080 x 60Hz. It's most noticeable when the movieclip is moving quickly.

    I don't have Flash installed to try this, but out of curiosity, what happens if you put "updateAfterEvent();" at the bottom of your onEnterFrame loop? This will force Flash to redraw.

    I actually suspect this will do nothing, but give it a try anyway.

  9. #9
    Junior Member
    Join Date
    Jul 2011
    Posts
    21
    Quote Originally Posted by marshdabeachy View Post
    I don't have Flash installed to try this, but out of curiosity, what happens if you put "updateAfterEvent();" at the bottom of your onEnterFrame loop? This will force Flash to redraw.

    I actually suspect this will do nothing, but give it a try anyway.
    It didn't seem to help, but thanks for trying.

    I hosted the file in CS4 format:
    http://www.mediafire.com/?wcsxx8y6gk3kmhb

  10. #10
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    No, nothing is really happening here - only, if I move it at a really fast speed, I'll just see a small white circle, on the outer part of the gray color fill, nothing else...
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  11. #11
    Junior Member
    Join Date
    Jul 2011
    Posts
    21
    Quote Originally Posted by Nig 13 View Post
    No, nothing is really happening here - only, if I move it at a really fast speed, I'll just see a small white circle, on the outer part of the gray color fill, nothing else...
    That is weird. I do not have to move even fast for the problem to occur. Moving at all is enough.

    EDIT:

    I just updated my GPU drivers, and it seems to make a difference. The problem is gone, but the movement seems to "flicker" a bit. It might be my actionscript right now, but I cannot see anything wrong in it.

    Actionscript:


    player.xSpeed = 0
    player.ySpeed = 0
    maxSpeed = 5
    acceleration = 0.2

    player.onEnterFrame = function(){

    listenKeys()
    limitSpeed()
    movement()

    }

    function limitSpeed(){
    if (player.ySpeed > maxSpeed){player.ySpeed = maxSpeed}
    else if (player.ySpeed < maxSpeed*-1){player.ySpeed = maxSpeed*-1}
    if (player.xSpeed > maxSpeed){player.xSpeed = maxSpeed}
    else if (player.xSpeed < maxSpeed*-1){player.xSpeed = maxSpeed*-1}
    }

    function movement(){
    player._x += player.xSpeed
    player._y += player.ySpeed
    }

    function listenKeys(){
    if(Key.isDown(Key.UP)){
    player.ySpeed -= acceleration
    }
    else if(Key.isDown(Key.DOWN)){
    player.ySpeed += acceleration
    }
    if(Key.isDown(Key.LEFT)){
    player.xSpeed -= acceleration
    }
    else if(Key.isDown(Key.RIGHT)){
    player.xSpeed += acceleration
    }
    }


    Download link: http://www.mediafire.com/?a103q19v91b64mi
    Last edited by Timppa; 07-16-2011 at 01:42 PM.

  12. #12
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Nope, the AS works like a charm - still probably your computer :P
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  13. #13
    Junior Member
    Join Date
    Jul 2011
    Posts
    21
    I just tried it again and the problem seems to be back. Pretty sure it is my computer like you mentioned

    Is there anything I could do? (besides buying a new one)

    My specs are:

    Sony Vaio VPC-CW1S1E

    Windows 7 64 bit
    2.13GHz Intel Core 2 Duo P7450
    Nvidia Geforce GT 230M
    4 Gb of RAM

    It should not be a performance issue with simple actionscript like that...

  14. #14
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    I am sorry, but I am NOT good with COMPUTERS. I am only good with things INSIDE the computer, lol. I am sorry, but maybe I'll try and google a solution for you?
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  15. #15
    Junior Member
    Join Date
    Jul 2011
    Posts
    21
    Quote Originally Posted by Nig 13 View Post
    I am sorry, but I am NOT good with COMPUTERS. I am only good with things INSIDE the computer, lol. I am sorry, but maybe I'll try and google a solution for you?
    If you can find anything that helps, that would be great! I haven't found anyone having similiar problems yet.

    From tomorrow be away on a holiday trip for a few days, so I won't be able to write here.

  16. #16
    Junior Member
    Join Date
    Jul 2011
    Posts
    21
    The problem really bothers me right now. I just tried creating a motion tween where a small, 10 px object moves across the screen. It becomes basically invisible at 60 FPS!

  17. #17
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Okay, so I experienced something similar, when making a movieclip follow the mouse - the greater the speed was, the more the movieclip was cut from either of its side, towards its middle part. But that happened when I used 60FPS - I think that has got to do something with the problem. But, you said that you experienced the same problem even when decrease the Framerate, didn't you?
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  18. #18
    Junior Member
    Join Date
    Jul 2011
    Posts
    21
    Quote Originally Posted by Nig 13 View Post
    Okay, so I experienced something similar, when making a movieclip follow the mouse - the greater the speed was, the more the movieclip was cut from either of its side, towards its middle part. But that happened when I used 60FPS - I think that has got to do something with the problem. But, you said that you experienced the same problem even when decrease the Framerate, didn't you?
    Yes, but the problem is less visible. The motion tween I mentioned. I first tested it at 24 FPS, only a bit white on the edges. Then 60 FPS, it turns invisible, only flashes at few points. Then 50 FPS, it flashes and "disappears" at few frames and looks a bit distorted at the edges.

    If I run it at a low frame rate like 20 FPS, the problem does not seem to happen or it is very hard to notice.

  19. #19
    Junior Member
    Join Date
    Jul 2011
    Posts
    21
    Problem still not solved.

  20. #20
    Senior Member
    Join Date
    Jun 2008
    Posts
    549
    I've had a similar problem. Make sure your movie clip is a whole pixel. ie. not 15.5px etc. For some strange reason when you animate a movie clips that not a whole pixel, it gets distorted.

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