Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions onActivate , onDeactivate infinite loop problem.

  • onActivate , onDeactivate infinite loop problem.

    Posted by Joshua Faget on September 16, 2016 at 10:31 pm

    Hello,

    I am trying to get some use out of the “onActiavate” event. When I run the code listed below, I get a infinite loop of alerts instead of one alert when the script “window” is on focus. I’d like just one alert for example, if you have some code running “onActive” its going to spike your CPU usage like crazy.

    myWin.show()

    var myWin = new Window("palette", "Window", undefined,{resizeable:true} );
    myWin.onActivate = function (){alert('Active')}
    myWin.show()

    Xavier Gomez replied 9 years, 7 months ago 2 Members · 1 Reply
  • 1 Reply
  • Xavier Gomez

    September 17, 2016 at 9:29 am

    If you put something that will deactivate the window on its onActivate callback…

    Xavier

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy