Re: [swfmill] newbie: creating animation from a series of jpg files various timings

2007-03-23 Thread Christopher Brian Jack
On Fri, 23 Mar 2007, XIX wrote:

> The frame rate you ask for and the frame rate flash actually runs at
> seldom seem to be the same. I don't mean frame dropping due to
> rendering time. From personal tests I've seen a request for 30fps
> actually yield 25fps even when nothing is being drawn and the cpu is
> 90% idle.
>
> Just something to remember if you experience timing problems.

My suggestion is to make objects you can control the points on (with HaXe
or AS) and use fractional translation based on a reliable timing source
(like the millisecond counter) to adjust animation frame-to-frame when
animation needs to synchronize to other things like music or other logic
(such as you might have in a game).

I'd recommend making a generalized class for handling fractional
translation and then a derived class that can load an object and display
it to the apporpriate translation on each frame's render-pass
(onEnterFrame).


deltaMSec
 :  (state_b - state_b or deltaStateAB)
totalMsec


deltaMSec starts at 0 (then record the time that the action starts
let's call it startTime), totalMsec is the time (in Msec) that you want
the translation to take from complete the change from state_a to state_b

on each pass (onEnterFrame) you compute deltaMSec as curTime-startTime
(curTime can be had with a function call) and clamp deltaMSec to the range
max(deltaMSec,0) and min(deltaMSec,totalMsec)

Multiply the ratio to get (deltaMSec * deltaStateAB) / totalMsec
and this gives you the translation for that frame.

.=========.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+='
| [EMAIL PROTECTED]
`=-
Hi Spambots, my email address is [EMAIL PROTECTED]
Hi Humans, my email address uses rot13 cipher

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] alternative vector sources

2007-02-28 Thread Christopher Brian Jack
Am I catching that right?  Flash just imports everything to a bunch of
actionscript?  With the only difference being the stuff in DefineShape
supports multiple frames whereas runtime AS doesn't?

On Wed, 28 Feb 2007, daniel fischer wrote:

> Date: Wed, 28 Feb 2007 18:02:45 +0100
> From: daniel fischer <[EMAIL PROTECTED]>
> Reply-To: swfmill@osflash.org
> To: swfmill@osflash.org
> Subject: Re: [swfmill] alternative vector sources
>
> Christopher Brian Jack <[EMAIL PROTECTED]> (on Wed, 28 Feb 2007 08:21:24 
> -0800 (PST)):
>
>   > >   > Yes.  So if I went to flash, drew a star, then run the above what 
> would I
>   > >   > be getting in the XML?
>   > >
>   > > Why not just try it? This is how i started understanding the SWF format.
>   >
>   > I don't own flash. :(
>
>
> fair enough, me neither-- i had my flatmate produce test swfs at the time :)
>
> i've attached a simple star swf (boiled down from
> http://swfmill.org/trac/browser/trunk/test , imported from svg :) for your 
> review. The LineTos is what you're probably interested in. CurveTo works just 
> the same but with x1,y1 (control point) and x2,y2 ("destination" point). Note 
> that the flash player doesnt render cubic beziers natively (you need to 
> approximate them with quadratic ones :().
>
> obviously, you'd need to understand some basics of SWF too (DefineSprite, 
> PlaceObject2) to analyze/produce more complex drawings. also, please note 
> that the structure of these is not swfmill's domain- swfmill's "lowlevel 
> dialect" just resembles the SWF structures as XML. all weirdness thanks to 
> macromedia (or even futuresplash) :)
>
> hope that helps.
> -dan
>
>
> --
> http://0xDF.com/
> http://iterative.org/
>

.=.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+='
| [EMAIL PROTECTED]
`=-
Hi Spambots, my email address is [EMAIL PROTECTED]
Hi Humans, my email address uses rot13 cipher

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] alternative vector sources

2007-02-28 Thread Christopher Brian Jack
On Wed, 28 Feb 2007, daniel fischer wrote:

> Christopher Brian Jack <[EMAIL PROTECTED]> (on Wed, 28 Feb 2007 07:40:56 
> -0800 (PST)):
>
>   > Yes.  So if I went to flash, drew a star, then run the above what would I
>   > be getting in the XML?
>
> Why not just try it? This is how i started understanding the SWF format.

I don't own flash. :(

.=========.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+='
| [EMAIL PROTECTED]
`=-
Hi Spambots, my email address is [EMAIL PROTECTED]
Hi Humans, my email address uses rot13 cipher

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] alternative vector sources

2007-02-28 Thread Christopher Brian Jack
On Wed, 28 Feb 2007, Jon Molesa wrote:

> I think he want to take a swf created in flash that does contain a
> vector object and
>
> swfmill swf2xml vector.swf vector.xml
>
> What tags should he look for in the xml output?
>
> >   > What does a vecotr object drawn in flash proper come out as in smfmill's
> >   > XML output?

Yes.  So if I went to flash, drew a star, then run the above what would I
be getting in the XML?

.=========.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+='
| [EMAIL PROTECTED]
`=-
Hi Spambots, my email address is [EMAIL PROTECTED]
Hi Humans, my email address uses rot13 cipher

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] alternative vector sources

2007-02-28 Thread Christopher Brian Jack
On Wed, 28 Feb 2007, Darren Cook wrote:

> > What about the second question then?  Is there something I can store
> > vectors as that the AS can access the controls point and vertices
> > with?
>
> If you had your vertices in JSON format it is basically actionscript so
> could be compiled by MTASC. You could then use actionscript's drawing
> functions.

Is there a description of this format somewhere?

Or would I be better off making a Haxe class for each vector object (that
creates its own movieClip when constructed)?

.=========.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+='
| [EMAIL PROTECTED]
`=-
Hi Spambots, my email address is [EMAIL PROTECTED]
Hi Humans, my email address uses rot13 cipher

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] alternative vector sources

2007-02-28 Thread Christopher Brian Jack
On Wed, 28 Feb 2007, Ian Thomas wrote:

> Don't know what you're talking about with SVG there, Christopher. If
> swfmill imported SVG, AS still couldn't access the control points and
> vertices, AFAICS.
>
> Ian

What about the second question then?  Is there something I can store
vectors as that the AS can access the controls point and vertices with?

> On 2/28/07, Christopher Brian Jack <[EMAIL PROTECTED]> wrote:
> >
> > Okay since everyone seems religiously opposed to making bug-free SVG
> > importing in swfmill are there any other vector formats that swfmill
> > recognizes that allow AS running withing the flash to access the control
> > points and vertcies of the vector objects?
> >
> > While AS can use the drawing primitives to draw into movieClips there's
> > no way to change control points or make use of frames when done this way
> > (except to redraw the shape in the movieClip each time).
> >
> > What does a vecotr object drawn in flash proper come out as in smfmill's
> > XML output?
>
> ___
> swfmill mailing list
> swfmill@osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
>

.=.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+='
| [EMAIL PROTECTED]
`=-
Hi Spambots, my email address is [EMAIL PROTECTED]
Hi Humans, my email address uses rot13 cipher

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


[swfmill] alternative vector sources

2007-02-28 Thread Christopher Brian Jack

Okay since everyone seems religiously opposed to making bug-free SVG
importing in swfmill are there any other vector formats that swfmill
recognizes that allow AS running withing the flash to access the control
points and vertcies of the vector objects?

While AS can use the drawing primitives to draw into movieClips there's
no way to change control points or make use of frames when done this way
(except to redraw the shape in the movieClip each time).

What does a vecotr object drawn in flash proper come out as in smfmill's
XML output?

.=.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+='
| [EMAIL PROTECTED]
`=-
Hi Spambots, my email address is [EMAIL PROTECTED]
Hi Humans, my email address uses rot13 cipher

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] MTASC and SWFMILL

2007-01-26 Thread Christopher Brian Jack
On Fri, 26 Jan 2007, daniel fischer wrote:

> Christopher Brian Jack <[EMAIL PROTECTED]> (on Thu, 01 Jan 1998 17:45:18 
> -0800 (PST)):
>
>   > I'd really like to be able to use SVG properly (ie: more than one in the
>   > SWF project).  Can't do a proper game without being able to manipulate
>   > vectorized shapes.  In fact this one thing could make SWF not an option if
>   > there's no way to get more than one SVG into a SWF project.
>
> Sorry Brian, that doesn't really make me consider spending any time on
> SVG import-- why should i care if you use SWF? Furthermore, there is a
> workaround: convert the SVGs one-by-one to SWF first, then import those
> SWFs. You wont be able to manipulate any of those shapes from flash
> though, either way (although certainly you can /use/ them).

Great thing to do.  Alienate the few people that use open source solutions
and force them to use the expensive alternatives (like flash) becuase
without swfmill Haxe can't do anything in its SWF export except make
simple shapes with the drawing primitives.  SWF is one of the few
cross-platform solutions that works equally acrosses platforms and OSes.
Little things like that...

.=.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+='
| [EMAIL PROTECTED]
`=-
Hi Spambots, my email address is [EMAIL PROTECTED]
Hi Humans, my email address uses rot13 cipher

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] MTASC and SWFMILL

2007-01-24 Thread Christopher Brian Jack
On Wed, 24 Jan 2007, daniel fischer wrote:

I'd really like to be able to use SVG properly (ie: more than one in the
SWF project).  Can't do a proper game without being able to manipulate
vectorized shapes.  In fact this one thing could make SWF not an option if
there's no way to get more than one SVG into a SWF project.

> Date: Wed, 24 Jan 2007 19:56:05 +0100
> From: daniel fischer <[EMAIL PROTECTED]>
> Reply-To: swfmill@osflash.org
> To: swfmill@osflash.org
> Subject: Re: [swfmill] MTASC and SWFMILL
>
> Hudson,
>
> "Hudson Ansley" <[EMAIL PROTECTED]> (on Wed, 24 Jan 2007 10:45:56 -0500):
>
>   > > nice to hear someone's using the class="..." hack. You should be aware 
> however, that it's a hack :) Not an ugly one, but it works only for mtasc and 
> only for flash7.
>   > >
>   >
>   > Hmmm, only flash 7? I've been using your "beautiful hack" with mtasc
>   > and  flash 8 without any problems. Anything I should be watching out
>   > for?
>
> sorry, /tested/ only for mtasc and flash7. might work somewhere else, too. 
> also, i meant to say "flash9". flash8 should be fine, as it uses the old 
> bytecodes.
>
> -dan
>
>
> --
> http://0xDF.com/
> http://iterative.org/
>
> ___________
> swfmill mailing list
> swfmill@osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
>

.=.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+='
| [EMAIL PROTECTED]
`=-
Hi Spambots, my email address is [EMAIL PROTECTED]
Hi Humans, my email address uses rot13 cipher

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org