[Top][All Lists]

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

Re: [Swftools-common] swfc: move individual nodes in outline

From: Matthias Kramm
Subject: Re: [Swftools-common] swfc: move individual nodes in outline
Date: Sun, 27 Jul 2008 12:37:41 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Thu, Jul 24, 2008 at 05:32:18PM +0300, Vladimir Dzhuvinov <address@hidden> 
> Now a question that deviates from the pdf2swf multitude ;)
> Is it possible to define an outline and then move individual nodes from 
> it in a frame? The standard "move" command affects the whole shape.

If I understand you correctly, the shapes should move at different
speeds, depending on their depth / z-coordinate?

You may need ActionScript for that. Something like

.sprite container
    .put shape1 x=0 y=0
    .put shape2 x=0 y=0
    .put shape3 x=0 y=0
    .put shape4 x=0 y=0 

    .frame 1
        // shape depths (z-coordinate)
        z0 = 1;
        z1 = 10;
        z2 = 20;
        z3 = 30;
        z4 = 40;
    .frame 2
        shape1._x = _parent._x * z1 / z0 - _parent._x;
        shape2._x = _parent._x * z2 / z0 - _parent._x;
        shape3._x = _parent._x * z3 / z0 - _parent._x;
        shape4._x = _parent._x * z4 / z0 - _parent._x;
    .frame 3
.put container x=0

.frame 50
.move container x=50



reply via email to

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