.flash bbox=500x400 version=6 fps=100 name="movctrl.swf" background=#CCCCCC compress .font f2 "font/Vera.ttf" .box b_area width=60 height=30 fill=black .circle ball r=8 color=blue fill=red line=1 .circle axe1 r=2 color=black fill=red line=1 .circle axe2 r=2 color=black fill=red line=1 .edittext info text="####" color=blue width=60 height=25 border variable=txtvar .sprite m_ball .put ball .end .sprite movie_sprite .frame 1 .put m_ball 40 20 .frame 50 .move m_ball 125 100 .frame 100 .move m_ball 210 20 .frame 150 .move m_ball 125 100 .frame 200 .move m_ball 40 20 .end .text t1 font=f2 text="Play" color=blue .button b_play .show b_area as=area y=-22 .show t1 as=idle .show t1 as=hover x=1 .show t1 as=pressed .on_press: MovPlay(); .end .end .text t2 font=f2 text="Stop" color=blue .button b_stop .show b_area as=area y=-22 .show t2 as=idle .show t2 as=hover x=1 .show t2 as=pressed .on_press: MovStop(); .end .end .text t3 font=f2 text="Next" color=blue .button b_next .show b_area as=area y=-22 .show t3 as=idle .show t3 as=hover x=1 .show t3 as=pressed .on_press: MovNext(); .end .end .text t4 font=f2 text="Goto" color=blue .button b_goto .show b_area as=area y=-22 .show t4 as=idle .show t4 as=hover x=1 .show t4 as=pressed .on_press: MovGoto(); .end .end .text t5 font=f2 text="Prev" color=blue .button b_prev .show b_area as=area y=-22 .show t5 as=hover x=1 .show t5 as=pressed .show t5 as=idle .on_press: MovPrev(); .end .end .put axe1 pin=center 5 5 .put axe2 pin=center 245 5 .put b_goto x=20 y=140 .put b_prev 170 140 .put info 80 120 .put b_play 20 180 .put b_stop 95 180 .put b_next 170 180 .action: _root.createEmptyMovieClip("movie",400); _root.attachMovie("movie_sprite","movie",400); movie.stop(); var monStyle= new TextFormat(); monStyle.align="center"; monstyle.size = 20; info.setnewTextFormat(monStyle); function MovPlay() { movie.play(); idinterval = setInterval(UpdateCounter, 30); } function MovStop() { clearInterval(idinterval); movie.stop(); } function MovNext() { movie.nextframe(); UpdateCounter(); } function MovGoto() { clearinterval(idinterval); movie.gotoAndstop(txtvar); DrawLines(); } function MovPrev() { movie.prevframe(); UpdateCounter(); } function UpdateCounter() { txtvar = movie._currentframe; DrawLines(); } function DrawLines() { _root.createEmptyMovieClip("movie_line",300); with (_root.movie_line) { beginFill (0x0000FF, 50); lineStyle (0, 0x0000FF,100); moveTo(5,5); lineTo ( movie.m_ball._x + 8 ,movie.m_ball._y + 8); endFill(); beginFill (0x0000FF, 50); lineStyle (0, 0x0000FF,100); moveTo(245,5); lineTo ( movie.m_ball._x + 8 ,movie.m_ball._y + 8); endFill(); } } UpdateCounter(); .end # .action .end # .flash