Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Montag, 24. Februar 2014, 08:29

Check containment with polygonal hotspot

Hi all.

I have a question about containment.
For example, there is a polygonal hotspot. And I clicked somewhere in hotspot.
Then, how can I figure out the point I clicked is included in hotspot?

The way I thought is.. see the attachment please.
Is it possible way?

Thanks in advanced.
Best Regards.

Kevin Lee.
»procarrie« hat folgendes Bild angehängt:
  • 1.png

2

Montag, 24. Februar 2014, 08:36

Hi,

the events (onclick,ondown,onover,...) of the polygonal hotspot will automatically only fire when inside the hotspot.

Best regards,
Klaus

3

Montag, 24. Februar 2014, 08:53

Thanks klaus.

So you mean if there is some click event I defined, when I click some point in polygonal hotspot, the event will fire.
And if the point is not located in hotspot, the event won't fire, right?

But my step is :
1. Click the some button.
2. Display icon by 1.
3. Move the icon in hotspot.

Then, the thing I want is just figure out the relation of containment as YES or NO. There's no event.
If the point I clicked is included in hotspot, I'll do something not going on click event.

So How can I make decision for this?


Kevin Lee.

4

Montag, 24. Februar 2014, 09:07

Sorry, but I don't understand how you mean that in detail...

What about using the onover/onout events to know if over the hotspot or not?

5

Montag, 24. Februar 2014, 09:18

Hi klaus.

Um.. I mean I want to make the decision my icon is included or not in hotspot.
When I move(drag) my icon in hotspot, easily popup the message "Included".

I think onover / onout events are useful for me.
I wonder methodology how it makes the decision included or not.

I'm gonna find the onover / onout events.
After that, I'll mention again my progress.

Thanks Klaus.


Kevin Lee.

6

Montag, 24. Februar 2014, 09:28

I wonder methodology how it makes the decision included or not.
Internally that works automatically by the Flashplayer. I don't know if the Flashplayer internally checks the point inside the polygon or if it checks the already rastered pixels...

7

Montag, 24. Februar 2014, 09:55

I'm worrying about this situation. (attachment)

Someone adds image and drag in hotspot like attachment.
If I use onover or onout events, the cursor is out of hotspot. But the some part of image is over on hotspot.

In this case, will onover event fire? or
when cursor location is over hotspot, will onover event fire?
»procarrie« hat folgendes Bild angehängt:
  • 1.png

8

Dienstag, 25. Februar 2014, 16:47

Hi,

yes, that might work, but it might be necessary to set (temporary) enabled=false for the dragging-image during the dragging to avoid that mouse events of the hotspots would be blocked by the dragging-image itself.

Best regards,
Klaus