• 1
name Punditsdkoslkdosdkoskdo

Is there an easy way to stop the stage?

I want to show "time is up" movie clip when the main time's over.Then goes to specific frame when 3 seconds countdown is over.I use the remove event listener,but I'll have write to code for all listeners and all levels.Is there an easy way of doing this?

import flash.utils.Timer;
import flash.ui.Multitouch;
import Turn;
import ScoreHolder;
timeisup.visible = false ;
//This timer start when the main timer stop.
var threesecond:Timer = new Timer(3000,0);
var minute:Number = 0;
var second:Number = 15;
//This timer check to timer and set to what happen if time over.
var timercheck:Timer = new Timer(1000,0);
timercheck.addEventListener(TimerEvent.TIMER, timercheck1);
function timercheck1(evt:TimerEvent):void {
if (minute <1 && second <1)
timeisup.visible = true;;
stage.removeEventListener(Event.ENTER_FRAME, h1);
stage.removeEventListener(Event.ENTER_FRAME, h2);
stage.removeEventListener(Event.ENTER_FRAME, h3);
stage.removeEventListener(Event.ENTER_FRAME, h4);
stage.removeEventListener(Event.ENTER_FRAME, h5);

////What gonna happen to when threesecond over
threesecond.addEventListener(TimerEvent.TIMER, zamanbittia);
function zamanbittia(evt:TimerEvent):void 
// Create the timer
// Checks the clock function every 1000 milisecond (1 second)
var timer:Timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, clock);
// Function that increments the timer
function clock(evt:TimerEvent):void { 
// every time this function is checked increment second by one
second -= 1;
// If the second is 59
if(second < 0){
// The minute will be plussed with 1
minute -= 1;
//and the zero will be set to 00
second = 59;

Also I tried

stage.frameRate = 0.01;

But it's to slow and If the timer stops while moving to objects then I get error.


On Mac OS, I found the best solution here. Quoting the author, two simple steps are:

1) Open Terminal and do the following:

export http_proxy=
export HTTP_PROXY=

2) Run R and do the following:


double-check this with:


I am behind university proxy, and this solution worked perfectly. The major issue is to export the items in Terminal before running R, both in upper- and lower-case.

  • 0
Reply Report