|
From: | Ludwig Weinzierl |
Subject: | Re: [Swftools-common] as3compile buggy output when compiling Sprite |
Date: | Mon, 25 May 2009 22:40:12 +0200 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090409) |
The following piece of code compiles and runs without errors when compiled with mxmlc from flex_sdk_3 or flex_sdk_4.0.0.4021. package{ import flash.display.Sprite; public class Sitemap extends Sprite{ public function Sitemap(){ graphics.beginFill(0x00ff00, 1); graphics.drawCircle(100, 100, 40); } } } It compiles without errors with as3compile from swftools 0.9.0, the swf does *not* run however. It was compiled with:
I have attach a possible solution for this. With this you can have a Sprite as mainclass. I don't know if this patch will raise others issues. Matthias???
Many thanks Ricardo. I applied the patch and it works great for me. The as3compiled version of my Sitemap.swf is around 200 KBytes smaller than the mxmlc compiled version:-) My real Sitemap.swf does neither extend MovieClip nor Sprite, but another Class which extends Sprite and which I would like to let as is because it is used in other contexts. So, there is a real use case behind 'Sprite extends mainclass' and it would be great to see this patch integrated in the next version. Cheers, Ludwig Weinzierl
[Prev in Thread] | Current Thread | [Next in Thread] |