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 4612940
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:28:28+00:00 2026-05-22T01:28:28+00:00

I switched over to EaselJS after having muleheadedly implemented all mouse and vector related

  • 0

I switched over to EaselJS after having muleheadedly implemented all mouse and vector related information in the HTML canvas element.

I have gotten used to EaselJS and it is really neat. I especially like the containers and how simple they make drawing embedded shapes. However, I can’t figure out how you, for example, implement a color change of a shape on a mouse over. Anything as simple as a rectangle changing color from red to green.

Am I supposed to remove the shape from its container and create a new shape with the new color?

To complicate matters, if one shape partially occludes another, lets say a square inside a circle, then onMouseOver will not register for the circle when over the square. Is there any way around this.

Cheers

EDIT: here is an example of the vector I use to draw my circle

    var circle=new Shape();
    circle.graphics.beginStroke("rgba(255,0,0,0.75)")
            .setStrokeStyle(lw)
            .drawCircle(w/2,h/2,r)
            .endStroke()
            .beginFill("rgba(255,255,0,0.5)")
            .drawCircle(w/2,h/2,r-lw/2)
            .endFill();
    circle.shadow=new Shadow("rgba(0,0,0,0.5)",10,-10,10)

Is there an easy way to pass a new color to beginFill? Can I use variable there? Does the circle.graphics... get executed only once, or every time there is a call to stage.update()?

  • 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-05-22T01:28:29+00:00Added an answer on May 22, 2026 at 1:28 am

    You want to change the Shape.graphics.beginFill to a different color on the mouseover.

    Here’s an example (warning: sloppy code!)

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

Sidebar

Related Questions

I just switched over from SVN where after a few changes to the trunk
I've just switched over to using ADODB with MySQL and PHP... I'm having troubles
Our company has recently switched over to using After the Deadline for our spell
Just switched over from eclipse to vs 2008 for debugging javascript, i feel more
I've switched over to kineticJS and I'm trying to have a background image repeat
I am currently using a RadTreeView and just switched over to using Load-On-Demand (ServerSideCallback)
I've mainly been using Mono for Android via Visual Studio, but have switched over
I've recently switched my app over to Rails 3.1 and began using the asset
We've just recently switched over from SVN to Mercurial, but now we are running
I am new to c#/.net and just switched over to it from classic asp(yesterday).

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.