开发者

How to implement click and pause/resume in flash?

开发者 https://www.devze.com 2023-01-19 05:23 出处:网络
Most flash video tutorials have this kind of feature,1开发者_如何学编程st click pauses the video,while 2nd click resumes it.

Most flash video tutorials have this kind of feature,1开发者_如何学编程st click pauses the video,while 2nd click resumes it.

How's that implemented in flash?


var on:Boolean;

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

   doWhatever();
}

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号