So, if I have a triangle and I click somewhere in it and see x=700 and
y=330. Where are these coordinates coming form? Is the left lower corner =
0;0?

On Mon, Sep 29, 2014 at 3:01 PM, Marcus Fritze <[email protected]
> wrote:

> Maybe, your "hot areas" are already shown inside the image and you don't
> need labels (links) above the image.
>
> You can use the click (MouseEvent.Click) event on the image and look at
> the click position. And now you can store your "hot areas" in a array and
> now you look if your target click position in inside the "hot area
> array"....
>
> Marcus Fritze
>
> > Am 29.09.2014 um 21:44 schrieb OmPrakash Muppirala <[email protected]
> >:
> >
> > You need to create these transparent labels/buttons and put it on top of
> > the image.  You will need to know the co-ordinates of where you want to
> > place them.
> >> On Sep 29, 2014 12:04 PM, "mark goldin" <[email protected]> wrote:
> >>
> >> Well, but what about an image?
> >>
> >> On Mon, Sep 29, 2014 at 2:01 PM, Philip Medlam <[email protected]
> >
> >> wrote:
> >>
> >>> You could use, for example, a label that has  a defined width/height
> and
> >>> position (x/y)
> >>> *    <s:Label id="hotSpot1" text="1" alpha="0.3"
> >>> click="hotSpot1_clickHandler(event)"/>*
> >>>
> >>> I tend to define the labels position in the creation complete function,
> >>> e.g.:
> >>>
> >>> *private function creationCompleteHandler(event:FlexEvent):void*
> >>> * {*
> >>> *            hotSpot1.width = 50;*
> >>> *            hotSpot1.height = 50;*
> >>> *            hotSpot1.x = myMap1.x + myMap1.width * 0.37 -
> >> hotSpot1.width /
> >>> 2;*
> >>> *            hotSpot1.y = myMap1.y + myMap1.height * 0.49 -
> >> hotSpot1.height
> >>> / 2;*
> >>> *}*
> >>>
> >>>
> >>> You can use a zero alpha and blank text as required
> >>>
> >>> and the handler to test the click:
> >>>
> >>> *        private function hotSpot1_clickHandler(event:MouseEvent):void*
> >>> *        {*
> >>> *            trace("Hotspot 1 clicked");*
> >>> *        }*
> >>>
> >>> Then you can modify the handler as required.
> >>>
> >>> Phil.
> >>>
> >>>
> >>> On Mon, Sep 29, 2014 at 7:40 PM, mark goldin <[email protected]>
> >>> wrote:
> >>>
> >>>> I need to have images that a user can either click on or move a mouse
> >>> over
> >>>> over some "hot" areas and trigger popups. Is there a way of making a
> >>> image
> >>>> responding to user mouse actions?
> >>>>
> >>>> Thanks
> >>>
> >>>
> >>>
> >>> --
> >>> Philip Medlam
> >>
>

Reply via email to