Skip to content

onActivate/onDeactivate #101

Description

@azrafe7

This seems to be a Flash Player issue (not strictly a FlashPunk one), but Event.ACTIVATE and Event.DEACTIVATE fire twice.

A simple workaround would be to check the last focus event, as in:

private function onActivate (e:Event):void
{
    if (_lastFocusEvent === Event.ACTIVATE) return;

    _lastFocusEvent = Event.ACTIVATE;
    ...
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions