Overlapping buttons in html5 issue
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Overlapping buttons in html5 issue

  1. #1
    theSWEEN thesween's Avatar
    Join Date
    Nov 2005
    Location
    Hertfordshire, England
    Posts
    305

    Overlapping buttons in html5 issue

    Hello everyone! I've made a map of the UK which is split into counties. Each county is a separate button which changes colour on rollover. I have then converted to html5. Looks awesome, works great in flash.

    The problem I have is that some buttons don't appear to work in html5 because the transparent part of nearby buttons is on top of them. So I hover over a button but the button next to it changes colour.

    To clarify, the counties are irregular shapes, but when they become buttons and converted to html5, the actual area of the buttons becomes square which includes the transparent area around the shape. This transparent area is part of the button and gets in the way. I hope this makes sense!

    Is there any way around this? Or has this issue been sorted in a newer version? I have version 8.3.0.

    Cheers
    Steve

  2. #2
    theSWEEN thesween's Avatar
    Join Date
    Nov 2005
    Location
    Hertfordshire, England
    Posts
    305
    I just realised that it also does it in flash.. Don't know why I've never noticed this before.. Any ideas of how this can be overcome?

  3. #3
    Super Moderator
    Join Date
    Jun 2000
    Posts
    3,236
    To fix this for your situation is not simple. You will need to recreate the button class used in kooljs.js (I assume you are using the CreateJS export libraries). There is a hit area bug in the current version which will be corrected in the next version to be released in about 10-14 days but that bug is probably not responsible for what you are seeing. You might need a custom hit area shape for each button or maybe clone the up state shape for the hit area shape. If you like, I can send you the button class in javascript. Make your own button class and use it instead but it would mean editing the exported html5 but not to a great extent. Where it says "new Btn", you would replace it with something like "new MyBtn". If you want the button class, email me.

  4. #4
    theSWEEN thesween's Avatar
    Join Date
    Nov 2005
    Location
    Hertfordshire, England
    Posts
    305
    Thank you Bob, I ended up making each shape it's own button with a Goto keyframe where the other buttons also changed colour. So it appears that the group of shapes are one button. It wasn't too much of a faff and works well now. I will be buying the new version very soon!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com