FLASH - Action Script - Pause Prroblem

Discussion in 'Programming' started by martinvidic, Jun 12, 2007.

  1. #1
    Hello....
    I hope anybody can help be detect following problem.
    I have a pause button on my site which stops animations...
    The only problem is that the first click never counts / works.

    Sample
    http://www.flashmavi.com/flash/flash_mavi_judo_okuriashi_harai.swf

    This is the script behind the button...

    on (release) {

    _global.pausa = "true";

    if (_global.pausa == "false") {

    _global.pausa = "true";
    stop();

    } else {

    _global.pausa = "false";
    play();

    }

    /*_parent.updateFrame();
    _parent.autoplayStatus = 0;
    _parent.indicator.gotoAndStop(1);
    prevFrame();*/
    }


    Thanx if anybody can help me fix the problem....
    bye
    Mavi
     
    martinvidic, Jun 12, 2007 IP
  2. SeLfkiLL

    SeLfkiLL Active Member

    Messages:
    85
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    50
    #2
    Well first of all if you set _global.pausa = "true" on button release and then right after test whether _global.pausa is "true" or "false", won't it always end up being false? Also you should use true and false without the quotes since these are keywords in ActionScript.
     
    SeLfkiLL, Jun 12, 2007 IP