You are not logged in.

gabriel

Beginner

  • "gabriel" started this thread

Posts: 28

Location: Paris, France

Occupation: photographer

  • Send private message

1

Thursday, November 21st 2013, 5:14pm

keep a plugin visible with a onver action

Hi All,
after seen the plugins and the tween actions, i have a problem with keeping a plugin visible,
here is my code:

Source code

1
2
3
<!-- plugins -->  <plugin name="ces"  url="%FIRSTXML%/graphics/menus/ces.png"  distorted="false"  align="top left"  scale="1.0"  zorder="200"  x="0.75%"  y="1%" onover="set(plugin[ces_over].visible,true); tween(plugin[ces_over].alpha,1,0,default);" onover="set(plugin[cad].visible,true); tween(plugin[cad].alpha,1,0,default);" onout="tween(plugin[ces_over].alpha,0,0,default, set(plugin[ces_over].visible,false);"             onout="tween(plugin[cad].alpha,0,0,default, set(plugin[cad].visible,false);" onclick=""             /> 
<plugin name="ces_over"  url="%FIRSTXML%/graphics/menus/ces_onover.png"  distorted="false"  align="top left"  scale="1.0"  zorder="201"  x="0.75%"  y="1%"  visible="false"  enabled="false"  alpha="0"             /> 
 <plugin name="cad"  url="%FIRSTXML%/graphics/menus/cad.png"  distorted="false"  align="topleft"  scale="1.0"  zorder="100"  x="0"  y="6%"  visible="false"  enabled="false"  alpha="1"  onover="set(plugin[cad].visible,true); tween(plugin[cad].alpha,1,0,default);"             />    



and i have two things who don't work:
-first, the on over of "ces" doesn't work
-second i would like to keep visible the cad-plugin when on over of himself.
I somebody have an xml example of what i'm looking for ( keep a plugin visible when onover - this plugin himself will be visible when a other plugin is on over ) if you want to see an example, it's here :[url]http://www.gabrielacoca.fr/dernierpdg/mercredi/[/url], wait a little bit to complete loading, and then go to the button " chambres et suites". Thank for your help.

2

Tuesday, November 26th 2013, 6:33pm

Hi,

an attribute (like onover/onout) can be defined only ONCE - when it will be defined a several times (like in your example - two onover and two onout) then the second definition will overwrite the first one and in HTML5 you will also get an error about this (because regarding xml syntax this is not allowed).

To call several actions in one event, just separate the calls with a ';' - e.g. onover="action1(); action2();"

Best regards,
Klaus