On Tue, Oct 11, 2005 at 09:49:57AM +0100, Pedro Jorge Caridade wrote:
> Basically, I use povray to generate the molecular animation, transform
> to swf format via png2swf. Until here everything is perfect and doing a
> swfdump, i see that the animation have 73 frames. But now I decided that
> I need two animations side by side and to put some buttons for start,
> stop, pause, restart, etc. What is the best solution for this? Use swfc
> or swfcombine? If one of this, does anybody have a simple example?
Use swfc. It's essentially the next generation replacement for
swfcombine, and there are few things swfcombine can do that you can't
do with swfc.
A simple example for a "player" functionality (stop, pause, play etc.)
is attached. Hope it's of help.
> Finally a not exactly swftools related question. If I use swfc, in the
> case of a loadMovie statement, what happens to the timeline present in
> the root file? I thought that if becomes of the included file, and if i
> put a stop() statement in the last frame (73 in the previous case) i
> don't get expected result.
MovieClip timelines are independent from the main timeline. If you stop
the main timeline, MovieClips will keep running. You need to stop
them explicitly, too, e.g. with
this.my_movieclip.Stop()
.
Greetings
Matthias
.flash version=6 fps=50 name="player.swf" bbox=800x600
.swf filetoplay "cxform.swf"
.put filetoplay
.action:
filetoplay.Stop();
Stop();
.end
.outline arrowoutline:
moveTo -30,-10
lineTo -30,10
lineTo 0,10
lineTo 0,20
lineTo 30,0
lineTo 0,-20
lineTo 0,-10
lineTo -30,-10
.end
.outline stopoutline:
moveTo -20,-20
lineTo -20, 20
lineTo 20, 20
lineTo 20,-20
lineTo -20,-20
.end
.outline pauseoutline:
moveTo -20,-20
lineTo -20, 20
lineTo -5, 20
lineTo -5,-20
lineTo -20,-20
moveTo 20,-20
lineTo 20, 20
lineTo 5, 20
lineTo 5,-20
lineTo 20,-20
.end
.filled arrow_blue outline=arrowoutline fill=blue line=3 color=grey
.filled arrow_green outline=arrowoutline fill=green line=3 color=grey
.filled arrow_cyan outline=arrowoutline fill=cyan line=3 color=grey
.filled stop_blue outline=stopoutline fill=blue line=3 color=grey
.filled stop_green outline=stopoutline fill=green line=3 color=grey
.filled stop_cyan outline=stopoutline fill=cyan line=3 color=grey
.filled pause_blue outline=pauseoutline fill=blue line=3 color=grey
.filled pause_green outline=pauseoutline fill=green line=3 color=grey
.filled pause_cyan outline=pauseoutline fill=cyan line=3 color=grey
.button leftbutton
.show arrow_blue as=area,idle scalex=-100%
.show arrow_green as=hover scalex=-100%
.show arrow_cyan as=pressed scalex=-100%
.on_release inside:
filetoplay.gotoAndStop(1);
.end
.end
.button stopbutton
.show stop_blue as=area,idle
.show stop_green as=hover
.show stop_cyan as=pressed
.on_release inside:
filetoplay.Stop();
.end
.end
.button pausebutton
.show pause_blue as=area,idle
.show pause_green as=hover
.show pause_cyan as=pressed
.on_release inside:
filetoplay.Stop();
.end
.end
.button rightbutton
.show arrow_blue as=area,idle
.show arrow_green as=hover
.show arrow_cyan as=pressed
.on_release inside:
filetoplay.Play();
.end
.end
.put leftbutton x=30 y=20
.put stopbutton x=100 y=20
.put pausebutton x=170 y=20
.put rightbutton x=240 y=20
.end
_______________________________________________
Swftools-common mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/swftools-common