Can i put a flash aplication in on my program on python?

Open alternative to Flash, ming, has some python support, looks like:
http://pyswftools.sourceforge.net/howto.html

Flash Tools based on Ming (ming.sourceforge.net) implemented in Python. Aim to provide a library of code between the ming library and a Flash GUI (which does not yet exist!). Features include SVG conversation and following specified paths.

http://sourceforge.net/projects/pyswftools/files/

However it is little out of date, looks like. The ming itself looks like having directly considered Python support(not surprisingly as it was developed also for One Laptop Per Child Flash solution):

Ming is an SWF ("Flash") file format output library. It is written in C, with wrappers for C++, Python, and PHP, plus rudimentary support for Ruby and Perl.

http://sourceforge.net/projects/ming/

can you see a mistake?. not run, help me, to correc the example and i need practice this aplication, thanks.
" name 'FlashShape' is not defined"

shp = FlashShape()
shp.setLine( 2, clr=FlashColor.red )
shp.drawRectangle( Point( -10, -10 ), 20, 20 )

spr = SWFSprite()
di = spr.add( shp )
for idx in range( 36 ):
di.rotate( 10 )
spr.nextFrame()

m = FlashMovie()
m.setBackground( clr=FlashColor.white )
m.setDimension( 100, 100 )
m.setRate( 10 )

di = m.add( spr )
for idx in range( 0, 100 ):
di.moveTo( 50, idx )
m.nextFrame()

m.save( 'example3.swf' )

How about your import statements?

Please push the (CODE) button before pasting code to Daniweb message.

sorry, i am learning to use thie web side!!!

try i need import a library? but what?

I also found this:
http://www.angelfire.com/nt/teklord/swfexport.htm

First looks like you need to install ming.

Download the flash_tools and cd to directory and do install like this (This is how I did in Windows, did not install ming though):

D:\>cd flash-tools-0.2.0

D:\flash-tools-0.2.0>ls
docs      flash_geometry  HISTORY  LICENSE               setup.py
examples  flash_svg       HOWTO    py_ext__ming_changes  svg2flash
FDBs      flash_utils     INSTALL  README                utilities

D:\flash-tools-0.2.0>type INSTALL
-*- mode: text -*-

Requirements
------------
1. Python 2.X  -- http://www.python.org
   The package was tested using a Python 2.3 release, but I have not tried
   it with any other release.

2. Ming -- http://sourceforge.net/projects/ming
   The 0.3.0 release can be used but requires a number of
   modifications. Better is to take a check out of the CVS repository and
   install that.

3. PyXML 0.8.3 -- http://www.python.org/sigs/xml-sig/
   Required only for Svg2Flash.

Installing
----------
Egg setup script is included.

prompt> python setup.py install


Help
----
This should build the example SWF films. If not, send me an email with the
subject: "flash_tools: it does not work" ;-)

--
Gerrit Riessen
gerrit.riessen@web.de

D:\flash-tools-0.2.0>python setup.py install
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\flash_utils
copying flash_utils\datapoint.py -> build\lib\flash_utils
copying flash_utils\diwrapper.py -> build\lib\flash_utils
copying flash_utils\FlashBarGraph.py -> build\lib\flash_utils
copying flash_utils\FlashColor.py -> build\lib\flash_utils
copying flash_utils\FlashImage.py -> build\lib\flash_utils
copying flash_utils\FlashMovie.py -> build\lib\flash_utils
copying flash_utils\FlashPie.py -> build\lib\flash_utils
copying flash_utils\FlashShape.py -> build\lib\flash_utils
copying flash_utils\FlashSprite.py -> build\lib\flash_utils
copying flash_utils\FlashText.py -> build\lib\flash_utils
copying flash_utils\__init__.py -> build\lib\flash_utils
creating build\lib\flash_geometry
copying flash_geometry\bezier.py -> build\lib\flash_geometry
copying flash_geometry\circle.py -> build\lib\flash_geometry
copying flash_geometry\ellipse.py -> build\lib\flash_geometry
copying flash_geometry\geombase.py -> build\lib\flash_geometry
copying flash_geometry\line.py -> build\lib\flash_geometry
copying flash_geometry\path.py -> build\lib\flash_geometry
copying flash_geometry\point.py -> build\lib\flash_geometry
copying flash_geometry\rectangle.py -> build\lib\flash_geometry
copying flash_geometry\version.py -> build\lib\flash_geometry
copying flash_geometry\__init__.py -> build\lib\flash_geometry
creating build\lib\flash_svg
copying flash_svg\path.py -> build\lib\flash_svg
copying flash_svg\shapeelements.py -> build\lib\flash_svg
copying flash_svg\__init__.py -> build\lib\flash_svg
running build_scripts
creating build\scripts-2.6
copying and adjusting svg2flash -> build\scripts-2.6
running install_lib
creating D:\Python26\Lib\site-packages\flash_geometry
copying build\lib\flash_geometry\bezier.py -> D:\Python26\Lib\site-packages\flash_geometry
copying build\lib\flash_geometry\circle.py -> D:\Python26\Lib\site-packages\flash_geometry
copying build\lib\flash_geometry\ellipse.py -> D:\Python26\Lib\site-packages\flash_geometry
copying build\lib\flash_geometry\geombase.py -> D:\Python26\Lib\site-packages\flash_geometry
copying build\lib\flash_geometry\line.py -> D:\Python26\Lib\site-packages\flash_geometry
copying build\lib\flash_geometry\path.py -> D:\Python26\Lib\site-packages\flash_geometry
copying build\lib\flash_geometry\point.py -> D:\Python26\Lib\site-packages\flash_geometry
copying build\lib\flash_geometry\rectangle.py -> D:\Python26\Lib\site-packages\flash_geometry
copying build\lib\flash_geometry\version.py -> D:\Python26\Lib\site-packages\flash_geometry
copying build\lib\flash_geometry\__init__.py -> D:\Python26\Lib\site-packages\flash_geometry
creating D:\Python26\Lib\site-packages\flash_svg
copying build\lib\flash_svg\path.py -> D:\Python26\Lib\site-packages\flash_svg
copying build\lib\flash_svg\shapeelements.py -> D:\Python26\Lib\site-packages\flash_svg
copying build\lib\flash_svg\__init__.py -> D:\Python26\Lib\site-packages\flash_svg
creating D:\Python26\Lib\site-packages\flash_utils
copying build\lib\flash_utils\datapoint.py -> D:\Python26\Lib\site-packages\flash_utils
copying build\lib\flash_utils\diwrapper.py -> D:\Python26\Lib\site-packages\flash_utils
copying build\lib\flash_utils\FlashBarGraph.py -> D:\Python26\Lib\site-packages\flash_utils

ok thanks i get it. ja ja the problems is that i`m speak spanish, and my english is so litle. thanks a lot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.