Skip to main content
Participating Frequently
March 2, 2022
Question

CTA button with simple mouse over and out

  • March 2, 2022
  • 1 reply
  • 198 views

hey guys. in html5 canvas. Im trying to create a CTA button with 2 states. 1) during mouse out 2) mouse over.

 

what are the ways to do this? Ive been searching the whole web and none of the solution works for me or i cant get it to work.

 

thanks for the help!

 

 

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    March 2, 2022

    for max control, use a movieclip but for what you describe a button will work, too.  what problem are you having using the up (mouse out) state, and the over (mouse over) state?

    king.tanAuthor
    Participating Frequently
    March 2, 2022

    i do have 2 movie clip but i dont know how to execute it as in code wise. also do i add the code on the movie clip?

     

    kglad
    Community Expert
    Community Expert
    March 2, 2022

    having a movieclip in each button frame isn't relevant to the coding (at this stage).  ie, if you have a button (regardless of what's in the up, over, out frames), no coding is needed for the button up, over and out frames.

     

    if you don't have/want a button but want to use a movieclip, you should create up, over and out frames on the movieclip timeline and use code to play the correct frame responding to the mouse.  let me know if this is what you want to do.