— Shang Liang

JSFL – Adjust elements x,y to integer

This script adjust the coordinates (x,y) of all elements on the stage and in the library into integers.

There are 2 problems related to an element (symbol) x,y positions set to float points (with decimals, e.g. 10.1 ). One is related to tweening and the other one is related to blurred pixel fonts. If an element has multiple elements inside it and the child elements’ coordinates are not integer, when the parent element start to move, the child elements wobble. For pixel fonts or bitmap text, when the x,y are not integers, the text appear to be blur as shown in the example below. All these problems can be solved by setting the x, y into integers. With this script, the process is automated. >>enjoy<<

2 comments
  1. borzoj says: August 14, 20075:52 am

    hi!
    found a couple of interesting posts on your blog. but when i wanted to subscreibe through google reader i couldn’t find the rss feed link. i was finally able to figure out but for the sake of other users who read blogs through rss – put your feed link somwehre on the page!

  2. smokin says: September 24, 20105:42 am

    the jsfl does not seem to be working

Submit comment

For spam filtering purposes, please copy the number 3279 to the field below: