Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

dividing an image into Hexagonal Grid

New Here ,
Sep 14, 2009 Sep 14, 2009

Hi Guys,

I have an image of a human body which needs to divided into Hexagonal Grid pattern and the hexagons should be highlighted on mouse rollover and also clicks. It will be time consuming if I make these hexagons manually coz they will around 1000 in numbers.

Also, I need to zoom the hexagons on clicks. Could you suggest me a way to do this?

Thank you.

TOPICS
ActionScript
963
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 14, 2009 Sep 14, 2009

you can create one hex grid element in the authoring environment or with the drawing api.  align the elements using actionsction to form your grid and assign mouse handlers.

to create the zoom effect you can use the bitmapdata class.  this will take intermediate to advanced coding skill.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 14, 2009 Sep 14, 2009

Thanks Kglad. But it's an uneven grid. Some cells are partially withing the body outline.How will arrange partial cell?

Also, to code this could you suggest me some tutorials?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 14, 2009 Sep 14, 2009

you'll need to use the bitmapdata class if you don't want the part of the grid that's outside the body to be visible.

the best place to check for tutorials is via google.  i'm not sure you'll find anything specific to your current task.  you might need to learn about the bitmapdata class and take it from there.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 14, 2009 Sep 14, 2009

Would you provide one example? I am not able to understnd how will create an uneven grid.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 14, 2009 Sep 14, 2009
LATEST

you can check gskinner's hitdetection class.  that will show you how using the bitmapdata class would work with your app.  (and it will show you that this isn't a good beginning project.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines