#!/usr/bin/python from ming import * Ming_setScale(20.0) Ming_useSWFVersion(6) WIDTH=200 HEIGHT=200 m=SWFMovie() m.setDimension(WIDTH,HEIGHT) m.setBackground(255,255,255) m.setRate(30.0) DIV=16 shapelist=[] for i in range(16): s=SWFShape() r=16*i g=12 b=255-16*i f=s.addFill(r,g,b) s.setLine(1,0,0,0) s.setRightFill(f) s.movePenTo(-WIDTH/DIV,-HEIGHT/DIV) s.drawLineTo(WIDTH/DIV,-HEIGHT/DIV) s.drawLineTo(WIDTH/DIV,HEIGHT/DIV) s.drawLineTo(-WIDTH/DIV,HEIGHT/DIV) s.drawLineTo(-WIDTH/DIV,-HEIGHT/DIV) shapelist.append(s) xcount=1 ycount=1 sc_width=4*WIDTH/DIV sc_height=4*HEIGHT/DIV inslist=[] for s in shapelist: ins=m.add(s) ins.moveTo(sc_width*xcount-sc_width/2,sc_height*ycount-sc_height/2) inslist.append(ins) xcount=xcount+1 if xcount > 4 : xcount=1 ycount=ycount+1 for ll in range(360): for ins in inslist: ins.rotateTo(ll) m.nextFrame() m.save("sample.swf") こんな感じです。 |