I have a series of areas, and wanted to get the effect of:  when the 
mouse is hovered over each area, the name of that area is displayed. 
To do this I have used the following code with the text being set to 
hidden until the mouse is hovered over the area it relates to, once 
the mouse is moved from that area the text once more becomes hidden. 

<script type="text/ecmascript">
                <![CDATA[
                function init ( evt )
                {
                        /*initialisation cpde goes here*/
                }
                
                function setMessage( visStatus )
                {
                        var message = svgDocument.getElementById
( "message" );
                        message.setAttribute( "visibility", 
visStatus );
                        
                }
                function setMessage1( visStatus )
                {
                        var message1 = svgDocument.getElementById
( "message1" );
                        message1.setAttribute( "visibility", 
visStatus );

</script>

I then use the following lines to display the name for each area: 

<text id="message" x="50" y="50" font-size="3" 
visibility="hidden">text here
  </text>
  
  <set xlink:href="#nameofarea" attributeName="display" to="inline"
  begin=" nameofarea.mouseover" end=" nameofarea.mouseout" 
onbegin="setMessage('visible')" onend="setMessage('hidden')" />

1.)Bearing in mind I have more than 10 areas,is there a way to do 
this without producing volumes of code by introducing a new function 
and set to match for each area(my current situation)?

2.)I have noticed that there are instances where the text from one 
area may remain on the screen despite the 'onend="setMessage
('hidden')"', given that I have the code correct, is there any reason 
why this should happen and if so is there a way to rectify this?

3.)Is there a similar script to the one above that would produce the 
same effect for paths or objects. E.g. on mouseover a shape/path 
becomes visible rather than text.

Any assistance is greatly appreciated  

Kind regards,

Mo




------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to