[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] possible bug in lib/action/compile.c

From: Matthias Kramm
Subject: Re: [Swftools-common] possible bug in lib/action/compile.c
Date: Fri, 7 Aug 2009 13:18:12 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Wed, Aug 05, 2009 at 12:56:28PM -0400, Jason Christopher Reed 
<address@hidden> wrote:
> Is this something that actually works in the current distribution, and not 
> merely in some future speculative world where embedding is supported?

It's something that actually works.

This is a (very small) example:

.flash name=as3file.swf version=9 bbox=400x200

    .swf otherSWF "somefile.swf"
    .put otherSWF
    .font MyArial "/usr/lib/win32/fonts/arial.ttf"

        import flash.display.Sprite
        import flash.display.MovieClip
        import flash.events.Event
        import flash.text.TextField
        import flash.text.TextFormat
        package {
            public class MyArial extends flash.text.Font
            public class MyMovieClip extends MovieClip
                public var otherSWF:Sprite = new Sprite();
                public function MyMovieClip()
                    var t:TextField = new TextField();
                    var f:TextFormat = new TextFormat();
                    f.font = "MyArial";
                    t.text = "scroll";
                    addEventListener(Event.ENTER_FRAME, newFrame);
                public function newFrame(e:Event)
                    this.otherSWF.x += 1;

You may notice that the whole thing is unecessarily complex, redundant
and missing elegance.
I don't personally recommend starting anything with the current syntax,
and rather wait for as3compile to support embedding.

> I don't have extremely strong opinions about future embedding syntax, 
> except argreeing that it would be nice to have some kind of compatibility 
> with existing Flex code, whether direct or indirect.

I agree that we'll be needing some degree of compatibility.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]