A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Why is my image-marquee wobbling?

  1. #1
    morb1d LUCI5R's Avatar
    Join Date
    Apr 2002
    Location
    Latham, NY
    Posts
    144

    Why is my image-marquee wobbling?

    Astrum,

    I've created tons of image-marquee's before, but i never had a problem like this.

    Nothing complicated.. just a bunch of equally sized images put together in a line, made into a movie clip that scrolls horizontally, infinitely...

    No action script. Just a combination of FPS and an amount of frames for the images to travel horizontally.

    But this time, the images shake.. they wobble, while they are travelling.

    I've tried all different combinations of FPS and Amount of Frames to adjust speed and smoothness, like i always do.. but the images still wobble!! Why?

    I'm attaching the .swf as a Zip file if anyone wants to see the wobble thingy...

    Any help will be really appreciated.

    Thanks.
    Attached Files Attached Files

  2. #2
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    The wobbling is due to antialiasing and unprecise positioning.
    You should check that all your images are aligned to pixels, or that they have exactly the same decimals..
    I'll try to explain this better:

    if you have two images one next to the other, but the one on the left has 100.0 for the x value and 100.0 for the width value, whereas the other image is placed on x: 200.2 (or x: 199.9), this second image will wobble if moving, compared to the first one, because when the graphics engine rounds it's position. It will often give different results for the two images.

    Hope this helps!

    p.s.
    Don't use Flash's "align to pixels" function because it's one of the many crap features................
    Altruism does not exist. Sustainability must be made profitable.

  3. #3
    morb1d LUCI5R's Avatar
    Join Date
    Apr 2002
    Location
    Latham, NY
    Posts
    144
    Astrum!

    I think you're absolutely correct. I had no clue about this, and i'm very sure this is the problem. I'm also very sure my images are not 100% equal..

    Thanks a ton. Let me work up on this.

    Cheers.

  4. #4
    morb1d LUCI5R's Avatar
    Join Date
    Apr 2002
    Location
    Latham, NY
    Posts
    144
    Originally posted by keyone.it
    The wobbling is due to antialiasing and unprecise positioning.
    You should check that all your images are aligned to pixels, or that they have exactly the same decimals..
    I'll try to explain this better:

    if you have two images one next to the other, but the one on the left has 100.0 for the x value and 100.0 for the width value, whereas the other image is placed on x: 200.2 (or x: 199.9), this second image will wobble if moving, compared to the first one, because when the graphics engine rounds it's position. It will often give different results for the two images.

    Hope this helps!

    p.s.
    Don't use Flash's "align to pixels" function because it's one of the many crap features................
    Astrum!

    Ok i'm still facing the problem.

    I have 8 images that i imported. They are all width : 50.0 and height : 50.0

    I placed them in the horizontal structure like this

    Image A : x = 50.0
    Image B : x = 100.0
    Image C : x = 150.0
    ... and so on.

    I had a little line graphic in the middle of all images, but i got rid of that for now and placed them all joined together. Once i get this working, i figured i could calculate the graphic width and work on making that happen.

    The wobbling has definately reduced a lot, but it's not gone.. still visible.

    What could i be doing wrong?

    Thanks.

  5. #5
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    ...well at this point I can only ask you one thing:
    are you moving all images separately or have you put them in a "container" movieclip and moving the clip itself?

    A part from that you can use a trick, but it requires actionscript...
    let me think of something that could suite you...
    code:

    // place this code in the MOVIECLIP ACTIONS:
    // from outside the movieclip, select it and
    // paste the following in the actions panel;
    onClipEvent(enterFrame) {
    this._x = Math.round(this._x);
    this._y = Math.round(this._y);
    }



    This could make the sliding of the clip flicker sometimes, but at least all the images should look like they are all stuck-up together.

    Hope this helps!
    Altruism does not exist. Sustainability must be made profitable.

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