Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7773633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:10:32+00:00 2026-06-01T17:10:32+00:00

I am writing a game on Javascript with canvas and easeljs and I wonder

  • 0

I am writing a game on Javascript with canvas and easeljs and I wonder if there are any ways to protect it. For example, I use stage.Addchild(index) to add a new object to the stage. Simply editing DOM I can attatch new event handler and fire it, something like <body onclick="stage.removeChild(0)"> and this will remove all the stage objects one by one.

I was thinking to filter all the coming events and check what had fired it. But I am not sure how to do that and there may be better ways to make it… Please point me in the right direction…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:10:33+00:00Added an answer on June 1, 2026 at 5:10 pm

    The best way to protect your Javascript is put all of your initialization code into closures and not expose anything against global variables.

    However, this only provides some guarantees against run-time namespace clashes and is meant to be used as good development practice.

    You cannot trust any code run on the client side; for anti-cheat behavior you need to check incoming inputs on the server-side. The users have 100% control over what is running in their browsers and this includes control to modify your code any way they wish.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing myself a little game in JavaScript, using jQuery. The game has a
I'm writing a simple game with javascript/html5, and I'm trying to implement gravity. The
I'm working on a simple JavaScript based game using the canvas tag. As part
I am writing simple game on flex. In the game there are 2 objects
I'm writing a game in javascript, and to prevent cheating, i'm having the game
I am currently working on writing small game that is written in javascript, alot
I'm writing a game in Android/OpenGLES, and when I use traceview, I see that
I'm writing a game of life program in mathematica however there is a caveat
I am writing a train based game in Facebook Javascript. I have an inverted
I'm thinking about writing some code in JavaScript which I can use in my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.