views:

8

answers:

1

Most flash video tutorials have this kind of feature,1st click pauses the video,while 2nd click resumes it.

How's that implemented in flash?

A: 
var on:Boolean;

function clickHandler(event:MouseEvent):void
{
   on = !on;

   doWhatever();
}

function doWhatever():void
{
    if(on)
      play();
    else
     pause();
}
PatrickS