{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1576","labels_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1576/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1576/comments","events_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1576/events","html_url":"https://github.com/HaxeFlixel/flixel/issues/1576","id":97262588,"number":1576,"title":"FlxSprite and alpha tweening breaks translucency on html5 target (flixel dev)","user":{"login":"Tw1ddle","id":1332318,"avatar_url":"https://avatars.githubusercontent.com/u/1332318?v=3","gravatar_id":"","url":"https://api.github.com/users/Tw1ddle","html_url":"https://github.com/Tw1ddle","followers_url":"https://api.github.com/users/Tw1ddle/followers","following_url":"https://api.github.com/users/Tw1ddle/following{/other_user}","gists_url":"https://api.github.com/users/Tw1ddle/gists{/gist_id}","starred_url":"https://api.github.com/users/Tw1ddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tw1ddle/subscriptions","organizations_url":"https://api.github.com/users/Tw1ddle/orgs","repos_url":"https://api.github.com/users/Tw1ddle/repos","events_url":"https://api.github.com/users/Tw1ddle/events{/privacy}","received_events_url":"https://api.github.com/users/Tw1ddle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-25T22:21:26Z","updated_at":"2015-07-28T20:01:11Z","closed_at":"2015-07-28T20:01:11Z","body":"Sprites are rendered opaque when alpha is changed/updated more than once on html5. Here's an example that should show an opaque red square with a translucent blue square on top of it, where the blue square should gradually tween from almost-transparent to opaque:\r\n\r\n```\r\nimport flixel.FlxG;\r\nimport flixel.FlxSprite;\r\nimport flixel.FlxState;\r\nimport flixel.tweens.FlxTween;\r\nimport flixel.util.FlxColor;\r\n\r\nclass Minimal extends FlxState {\t\r\n\toverride public function create():Void {\r\n\t\tsuper.create();\r\n\t\t\r\n\t\tvar opaqueRectangle = new FlxSprite();\r\n\t\tvar translucentSquare = new FlxSprite();\r\n\t\t\r\n\t\topaqueRectangle.makeGraphic(FlxG.width, 100, FlxColor.RED);\r\n\t\ttranslucentSquare.makeGraphic(200, 300, FlxColor.BLUE);\r\n\t\t\r\n\t\topaqueRectangle.screenCenter();\r\n\t\ttranslucentSquare.screenCenter();\r\n\t\t\r\n\t\topaqueRectangle.alpha = 1.0;\r\n\t\ttranslucentSquare.alpha = 0.1; // Almost-transparent square\r\n\t\t\r\n\t\tFlxTween.tween(translucentSquare, { alpha: 0.8 }, 4); // Comment this out and the blue square will be translucent on html5...\r\n\t\tFlxTween.tween(translucentSquare, { x: FlxG.width / 2 + 200 }, 10); // A position tween works as expected, so it's not just that tweens are broken on html5...\r\n\t\t\r\n\t\tadd(opaqueRectangle);\r\n\t\tadd(translucentSquare);\r\n\t}\r\n}\r\n```\r\n\r\nBlue square is rendered incorrectly/opaque on html5:\r\n\r\n<img width=\"531\" alt=\"screenshot_77\" src=\"https://cloud.githubusercontent.com/assets/1332318/8891470/32103ea6-3323-11e5-819a-9ecc5b3b8ed5.png\">\r\n\r\nIt should be translucent and slowly tween to almost-opaque, as it does on Flash:\r\n\r\n<img width=\"612\" alt=\"screenshot_76\" src=\"https://cloud.githubusercontent.com/assets/1332318/8891467/1cbe4b42-3323-11e5-9894-b6ab622cc468.png\">\r\n\r\nHere are my haxelibs:\r\n```\r\nflixel-addons: git [dev:C:\\HaxeToolkit\\haxe\\lib\\flixel-addons/git]\r\nflixel: git [dev:C:\\HaxeToolkit\\haxe\\lib\\flixel/git]\r\nhxcpp: [3.2.102]\r\nlime: [2.5.2]\r\nopenfl: [3.2.2]\r\nswf: [1.9.1]\r\n```\r\n\r\nAny ideas?\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/24952593-flxsprite-and-alpha-tweening-breaks-translucency-on-html5-target-flixel-dev?utm_campaign=plugin&utm_content=tracker%2F254189&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F254189&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/comments/125736675","html_url":"https://github.com/HaxeFlixel/flixel/issues/1576#issuecomment-125736675","issue_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1576","id":125736675,"user":{"login":"Gama11","id":2620907,"avatar_url":"https://avatars.githubusercontent.com/u/2620907?v=3","gravatar_id":"","url":"https://api.github.com/users/Gama11","html_url":"https://github.com/Gama11","followers_url":"https://api.github.com/users/Gama11/followers","following_url":"https://api.github.com/users/Gama11/following{/other_user}","gists_url":"https://api.github.com/users/Gama11/gists{/gist_id}","starred_url":"https://api.github.com/users/Gama11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gama11/subscriptions","organizations_url":"https://api.github.com/users/Gama11/orgs","repos_url":"https://api.github.com/users/Gama11/repos","events_url":"https://api.github.com/users/Gama11/events{/privacy}","received_events_url":"https://api.github.com/users/Gama11/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T20:01:11Z","updated_at":"2015-07-28T20:01:11Z","body":"Closing as this seems to be a Lime issue (see https://github.com/openfl/lime/issues/520)."}}