Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flash] Make stage properly capture clicks #804

Closed
wants to merge 1 commit into from
Closed

[Flash] Make stage properly capture clicks #804

wants to merge 1 commit into from

Conversation

odnamrataizem
Copy link
Contributor

This makes the stage capture click events instead of mouse downs. As such, it can be checked whether the user actually clicked the stage rather than a button on the controls bar (or the controls bar itself) before sending the event to the DOM.

This should fix a bunch of related issues, like #742.

This makes the stage capture click events instead of mouse downs. As
such, it can be checked whether the user actually clicked the stage
rather than a button on the controls bar (or the controls bar itself)
before sending the event to the DOM.

This should fix a bunch of related issues, like #742.
@johndyer johndyer closed this Apr 10, 2013
@odnamrataizem
Copy link
Contributor Author

Yep, just that.

@odnamrataizem
Copy link
Contributor Author

Oh CRAP nvm, I forgot there was another change there, sorry. This one is essential to properly fix #742 so it only sends back to the DOM clicks to the stage.

FlashMediaElement.stageClicked() should look like this:

function stageClicked(e:MouseEvent):void {
    //_output.appendText("click: " + e.stageX.toString() +","+e.stageY.toString() + "\n");

    // only send event if user actually clicked the stage
    if (e.target == stage) {
        sendEvent("click", "");
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants