Hi Panomaster, and thank you for your answer.
here are some explainations of what i'm looking to do :
i have a hotspot named "music" who play music while on over :
|
Source code
|
1
|
<hotspot name="music1" onover="playsound(bgsnd, 'url.mp3|alt_url.ogg', 0); check_decompte(); trace(hotspot[music1].name)" />
|
this hotspot is set to enabled="false", and is enabled="true" when he is at the middle of the screen. This is done by a other action based on getlooktodistance action.
In the same time the user can give the name of the music in a box, i use for that the plugin textinput.js
the action "compare" is called directly by the plugin and compare the answer of the user with the true name of the music.
|
Source code
|
1
|
<action name="comparekc"> set (A,false); if((text == "right name of the music currenntly played"), set (A, true)); if(A == true,
|
|
Source code
|
1
|
<plugin name="inputtest" devices="html5" type="container" url="textinput.js" text="" onchanged="txtadd(plugin[output].html,, get(text)); compare(); set(text,);" enabled="true"/>
|
this works, but works also for all the hotspots, if they are at the middle of the screen or not.
What i want to do is a double condition : if the hotspot is at the middle of the screen And if the answer is correct, then is ok
the trace fonction for the hotspot works , the inputtest works too, what i want to do is to put them together in a double condition : if the hotspot is at the middle of the screen, and if the answer is correct, then do something.
thanks a lot for your help,
Gabriel.