PDA

View Full Version : Mouseover only for real shape


allen
08-17-2005, 09:54 AM
hi,

I would like to create a view which has a resource with a flash file.
The flash file has only a circle and two frames (for mouseover and normal state).

This is running with my code fine.

My problem is, that the area where the mouseover will be recognized is a rectangle, not the real circle.

So my question is, what can I do, that the mouseover will only change the frame when the mouse is really over the circle?

Many thanks in advance,

Allen

Here is my used code:
<canvas height="300" width="600">
<splash/>
<resource name="mapBayernSWF" src="Resources/Bayern.swf"/>
<resource name="mapNRWSFW" src="Resources/NRW.swf"/>
<resource name="mapBerlinSWF" src="Resources/Berlin.swf"/>
<view x="20" y="50" resource="mapBerlinSWF"
onmouseover="this.setAttribute('frame', 1)"
onmouseout="this.setAttribute('frame', 2)"/>

<view x="250" y="50" resource="mapNRWSFW"
onmouseover="this.setAttribute('frame', 1)"
onmouseout="this.setAttribute('frame', 2)"/>

<view x="380" y="50" resource="mapBayernSWF"
onmouseover="this.setAttribute('frame', 1)"
onmouseout="this.setAttribute('frame', 2)"/>
</canvas>

allen
08-18-2005, 07:33 AM
after searching in the forums, I got the answer:

There is a property called "clickregion" in view which takes a filename.

After I am using this, only the real shape of the graphic file will be recognized by a mouseover or mouseout.

trucker_
04-12-2007, 12:59 PM
can you explain the usage of clickregion pls...?

anybody?