3

I'm trying to get antialiasing on a MovieClip object after constructing it from a object and its mask, both MovieClips loaded from swf via SWFLite:

var icon:MovieClip = Assets.getBattleAbility(ability.id); //getting a base object
icon = squareToRound(icon); // applying a mask (new MovieClip-container created)
add(icon, treeAbX(ability.j), treeAbY(ability.i));
icon.cacheAsBitmap = true;

The object doesn't appear. When I added a click listener to a object with handler setting cacheAsBitmap to true, object began to vanish after I clicked on it.

What could be the problem here and how to fix it?

Gulvan
  • 305
  • 2
  • 12

1 Answers1

2

Looks like there is a known issue with mask positioning when cacheAsBitmap = true.

heyitsbmo
  • 1,715
  • 1
  • 14
  • 29
  • Seems like that issue is abandoned, at least for now, so I wonder if there is any ways to work around. I'm making a game, it has 6+ strains each consisting of 28 abilities. Each of the abilities has a square icon that is used in battle and a similar round icon that is used between battles. I decided to use round mask not to double the work I do when I draw these icons, but without anti-aliasing, round icons look way too angular. – Gulvan Apr 04 '18 at 10:53
  • The linked issue appears to work using current development versions of OpenFL and Lime. If there is still an issue, a small test case would be valuable for reproducing the issue. Thank you! :) – Joshua Granick Apr 24 '18 at 15:48