swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] SWF python module: no attribute polling?


From: Matthias Kramm
Subject: Re: [Swftools-common] SWF python module: no attribute polling?
Date: Fri, 21 Jan 2005 19:59:41 +0100
User-agent: Mutt/1.5.6i

On Thu, Jan 20, 2005 at 11:44:41PM +0900, Daichi Shinozaki wrote:
> michael geary wrote:
> >I'm trying to get some info about a loaded SWF. 
> > When I'm in the python interpreter, I can simply
> >type my swf variable and get a dump of some info:
> >
> > >>> swf
> >File size       325414
> >Movie width     664
> >Movie height    634
> >Frame rate      12.0
> >Frame count     32
> >
> >but how can I get this information programmatically? 
> 
> You can get the frame rate of a loaded movie using
> python>>> swf = SWF.load("foo.swf")
> python>>> swf.fps
> 
> I think rest of properties is not accessible from the python module.
> Here is the patch to SWF.c version 0.6.2.

Thanks for the patch- I included it.
In fact, width/height were accessible before, but only via the bounding
box:
    width: swf.bbox.xmax - swf.bbox.xmin
    height: swf.bbox.ymax - swf.bbox.ymin
.
But (with your patch) just swf.width / swf.height is 
much more readable. :)

Greetings

Matthias






reply via email to

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