Skip to content

onActivate/onDeactivate #101

@azrafe7

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;
    ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions