Michael Pliskin | 4 Feb 2008 15:14
Picon

Extending existing swf

Hello list,

  is there a way to make swfmill add resources into an existing swf
  instead of making a new one? What I need is to make an swf (version
  9) containing:
   - compiled AsWing A3 library (pure AS3 code)
   - some resources (i.e. graphics)

  I am looking for a way to add graphics into already compiled
  aswing.swf (made by compc from Flex2 SDK). Any pointers here?

--

-- 
Best regards,
 Michael                          mailto:pl@...
Krzysztof Różalski | 4 Feb 2008 15:52

Re: Extending existing swf

Michael Pliskin pisze:
> Hello list,
>
>   is there a way to make swfmill add resources into an existing swf
>   instead of making a new one? What I need is to make an swf (version
>   9) containing:
>    - compiled AsWing A3 library (pure AS3 code)
>    - some resources (i.e. graphics)
>
>   I am looking for a way to add graphics into already compiled
>   aswing.swf (made by compc from Flex2 SDK). Any pointers here?
>
>   
Hi Michael,
I usually do this by combining two or more swfs. Sth like that:

<movie>
   <clip id="aswing_as3" import="aswing_as3.swf"/>
   <clip id="some_assets" import="assets.swf" />
   <clip id="componentsTheme" import="theme.swf" />
   <frame>
       <library>
       </library>
   </frame>
</movie>

So basically no need to add resources into existing swf - just make 
another out of them.
Hope that is what are you looking for...

(Continue reading)

Michael Pliskin | 4 Feb 2008 16:05
Picon

Re: Extending existing swf

Hello Krzysztof,

  Thanks for the tip, this is what I was doing for AS2 as well.
  However, if I do like that, I don't know (yet) any way in Flash9 to
  access AsWing classes being 'hidden' in aswing_as3. Do you know any
  way to deal with that?

Mike

KR> I usually do this by combining two or more swfs. Sth like that:

KR> <movie>
KR>    <clip id="aswing_as3" import="aswing_as3.swf"/>
KR>    <clip id="some_assets" import="assets.swf" />
KR>    <clip id="componentsTheme" import="theme.swf" />
KR>    <frame>
KR>        <library>
KR>        </library>
KR>    </frame>
KR> </movie>

KR> So basically no need to add resources into existing swf - just make 
KR> another out of them.
KR> Hope that is what are you looking for...

KR> Christopher

--

-- 
Best regards,
 Michael                            mailto:pl@...
(Continue reading)

Will | 4 Feb 2008 17:56

Re: Extending existing swf

I dont know how aswing works exactly, but for as3 in general I think you 
can access the clip_id as a class.

Michael Pliskin wrote:
> Hello Krzysztof,
>
>   Thanks for the tip, this is what I was doing for AS2 as well.
>   However, if I do like that, I don't know (yet) any way in Flash9 to
>   access AsWing classes being 'hidden' in aswing_as3. Do you know any
>   way to deal with that?
>
> Mike
>
> KR> I usually do this by combining two or more swfs. Sth like that:
>
> KR> <movie>
> KR>    <clip id="aswing_as3" import="aswing_as3.swf"/>
> KR>    <clip id="some_assets" import="assets.swf" />
> KR>    <clip id="componentsTheme" import="theme.swf" />
> KR>    <frame>
> KR>        <library>
> KR>        </library>
> KR>    </frame>
> KR> </movie>
>
> KR> So basically no need to add resources into existing swf - just make 
> KR> another out of them.
> KR> Hope that is what are you looking for...
>
> KR> Christopher
(Continue reading)

Michael Pliskin | 5 Feb 2008 11:07
Picon

Re: Extending existing swf

Hello Will,

W> I dont know how aswing works exactly, but for as3 in general I think you
W> can access the clip_id as a class.

Yes but what I need is to access AsWing classes inside this clip - so
the 'full path' might look like 'aswing_as3.org.aswing.Component' or
like that. Not sure if it is possible, will try more.

Mike

W> Michael Pliskin wrote:
>> Hello Krzysztof,
>>
>>   Thanks for the tip, this is what I was doing for AS2 as well.
>>   However, if I do like that, I don't know (yet) any way in Flash9 to
>>   access AsWing classes being 'hidden' in aswing_as3. Do you know any
>>   way to deal with that?
>>
>> Mike
>>
>> KR> I usually do this by combining two or more swfs. Sth like that:
>>
>> KR> <movie>
>> KR>    <clip id="aswing_as3" import="aswing_as3.swf"/>
>> KR>    <clip id="some_assets" import="assets.swf" />
>> KR>    <clip id="componentsTheme" import="theme.swf" />
>> KR>    <frame>
>> KR>        <library>
>> KR>        </library>
(Continue reading)

Paul Colomiets | 7 Feb 2008 16:07

Rotation attribute

Hi!

Firstly I've updated swfmill reference on osflash 
(http://osflash.org/swfmill),
to reflect SVG import info. I'd be happy if someone look at that since 
that info is
based only on my experience. Also I don't know if certain features 
available only
in preview version not in stable release.

I'm also wondering if there is support for rotation attribute in place tag
(or somewhere in xml)?

--
Paul.
Mark Winterhalder | 7 Feb 2008 16:46
Picon

Re: Rotation attribute

On Feb 7, 2008 4:07 PM, Paul Colomiets <pc@...> wrote:
> Hi!
>
> Firstly I've updated swfmill reference on osflash
> (http://osflash.org/swfmill),
> to reflect SVG import info. I'd be happy if someone look at that since
> that info is
> based only on my experience. Also I don't know if certain features
> available only
> in preview version not in stable release.

Thanks for updating the wiki!

If you want to check for supported attributes, the ultimate source is
still the source:
<http://swfmill.org/trac/browser/trunk/src/xslt/simple-elements.xslt>
It's fairly readable and easy to understand.

> I'm also wondering if there is support for rotation attribute in place tag
> (or somewhere in xml)?

There is no direct support for a rotation attribute, but for x, y,
scalex, scaley, skewx and skewy, which amounts to a transformation
matrix. So, if you want to rotate, it /should/ be (not tested):

scalex = cos( angle )
scaley = cos( angle )
skewx = -sin( angle )
skewy = sin( angle )

(Continue reading)

Paul Colomiets | 8 Feb 2008 12:24

Re: Rotation attribute

Mark Winterhalder wrote:
>
> If you want to check for supported attributes, the ultimate source is
> still the source:
> <http://swfmill.org/trac/browser/trunk/src/xslt/simple-elements.xslt>
> It's fairly readable and easy to understand.
>
>   
I've looked that, just not realized that skew, scale and shift
is a full transformation matrix.
>> I'm also wondering if there is support for rotation attribute in place tag
>> (or somewhere in xml)?
>>     
>
> There is no direct support for a rotation attribute, but for x, y,
> scalex, scaley, skewx and skewy, which amounts to a transformation
> matrix. So, if you want to rotate, it /should/ be (not tested):
>
> scalex = cos( angle )
> scaley = cos( angle )
> skewx = -sin( angle )
> skewy = sin( angle )
>
> Admittedly, this is not as straight forward as one would wish for...
>   
Thanks, it works (althrough seems that I need to change angle to - angle).
Isn't it a nice addition to xsl stylesheet?

And yet another attribute is embedFonts. There no such attribute
neither in xslt/simple-elements.xslt nor codegen/simple.xml (probably
(Continue reading)

INADA Naoki | 8 Feb 2008 13:18

Patch: accurate format for floating point values

Hi swfmill users and developers.

Some floating point values have a little error when swfmill converts swf -> xml -> swf.

Some format of floating and fixed point values is in swf. Swfimill output format lacks number of
significant figures for several of those.

Attached patch fixes this problem in following way.
 1. use 'double' for all of real (floating and fixed point) numbers in swf. 
 2. use "%-.60lg" for printf format.

* Why %-.60lg ?
Double-precision floating point value have 52 bit of significant number.
(http://en.wikipedia.org/wiki/IEEE_floating-point_standard)
And 10 contains 2 as a factor. So decimal real number needs 52 significant figures for accurate
representation of double-precision floating point value.
60 have some room against 52. And %-.60lg prints no unnecessary 0s.

--

-- 
Sorry about my poor English.

INADA Naoki <inada-n@...>
Attachment (precision_float.patch): application/octet-stream, 5428 bytes
_______________________________________________
swfmill mailing list
swfmill@...
http://osflash.org/mailman/listinfo/swfmill_osflash.org
(Continue reading)

Chris Hecker | 8 Feb 2008 19:21

Re: Patch: accurate format for floating point values


I think if you want to do this you should use David Gay's routines:

http://www.netlib.org/fp/

dtoa.c & g_fmt.c

Chris

INADA Naoki wrote:
> Hi swfmill users and developers.
> 
> Some floating point values have a little error when swfmill converts swf -> xml -> swf.
> 
> Some format of floating and fixed point values is in swf. Swfimill output format lacks number of
significant figures for several of those.
> 
> Attached patch fixes this problem in following way.
>  1. use 'double' for all of real (floating and fixed point) numbers in swf. 
>  2. use "%-.60lg" for printf format.
> 
> 
> * Why %-.60lg ?
> Double-precision floating point value have 52 bit of significant number.
> (http://en.wikipedia.org/wiki/IEEE_floating-point_standard)
> And 10 contains 2 as a factor. So decimal real number needs 52 significant figures for accurate
representation of double-precision floating point value.
> 60 have some room against 52. And %-.60lg prints no unnecessary 0s.
> 
> 
(Continue reading)


Gmane