Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
kili0601

Cursor not changing on mouseover (Animate html5 banner)

Recommended Posts

Hi, new to these forums. I have a html5 banner I created in Animate for DCM with a click tag. Everything works fine, the link works if you click the banner, it validates in DCM html checker, but when i view the banner in a browser the cursor doesn't change to the hand/pointer cursor like it does on all links, banners. Any idea why this would happen? Any help would be much appreciated!

 

Thanks!

Link to post
Share on other sites

Hello kili0601 and welcome to the GreenSock forum!

 

This is more of a CSS related question then a question regarding the GSAP API

 

So depending on what element you want  the CSS cursor:pointer property on.. then add this to your CSS style-sheet or style tag

.element-you-want-hand-cursor-on {
    cursor: pointer;
}

If you still don't see the hand cursor, then some other style is overriding the cursor CSS property in another CSS rule or even inline on the tag. In that case you could add this

.element-you-want-hand-cursor-on {
    cursor: pointer !important;
}

Resource:

CSS cursor property: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

 

If your still having an issue please create a reduced codepen so we can see your code live:

 

 

:)

Link to post
Share on other sites

Thank you Jonathan! Sorry if posted wrongly here. More of a designer than a coder. In any case, oddly my published file did not have  

 

stage.enableMouseOver();

 

in it. I added that to html file and problem solved. 

Link to post
Share on other sites

This is a little confusing since we don't actually use the button to click through. Just having a button symbol gives you a cursor, and it adds this to your published HTML

 

stage.update();
stage.enableMouseOver();
 
and then on your canvas div right before ending >
onclick="javascript:window.open(window.clickTag)
 
Alternately you could wrap your canvas div with an HREF but its not valid. (though it does work)
Link to post
Share on other sites

Hey guys, with Animate and CreateJS I found that using the stage.enableMouseOver() a bit laggy even if you bump of the rate.

 

Check out the template in this thread where we use Animate CC and GSAP together. There are 2 Profile templates for Standard and Rich Media DC Banners

http://greensock.com/forums/topic/13774-animate-cc-gsap-starter-file-needed/#entry58050

 

Depending on how you need the cursor to perform this may or may not work for you. In most banner cases this template should serve you fine.

 

Take a look and let me know how it works for you

 

Good luck

- Patrick

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×