Ola pessoal
Eu fiz um codigo que não sei porque as vezes funciona as vezes não.Tenjte achar algum erro mas não consequi achar.
O codigo ele e uma iniciação de uma foto (no caso) ou um video e um certo audio como se fosse uma apresentação, e depois dessa apresentção tem um menu. Desse menu você inicia algo ou sai da interação.Mas as vezes da certo outras não, tem hora que quando e selecionado uma opção do menu ele não encerra oque devia encerrar ou nao executa o que deveria executar o codigo está abaixo:
Agradeço pela ajuda
<head>
<ruleBase>
<rule id="r1" var="op" comparator="eq" value="1"/>
<rule id="r2" var="op" comparator="eq" value="2"/>
</ruleBase>
<regionBase>
<region id="fundoRg" width="100%" height="100%" zIndex="1">
<region id="imagemRg" left="25%" width="75%" height="100%" zIndex="2"/>
<region id="botomS1Rg" bottom="80%" right="80%" left="5%" width="20%" height="5%" zIndex="2"/>
<region id="botomS2Rg" bottom="70%" right="80%" left="5%" width="20%" height="5%" zIndex="2"/>
<region id="iconSRg" bottom="5%" left="5%" width="3%" height="3%" zIndex="2"/>
<region id="iconERg" bottom="5%" left="15%" width="2%" height="2%" zIndex="2"/>
</region>
</regionBase>
<descriptorBase>
<descriptor id="fundoD" region="fundoRg"/>
<descriptor id="imagemD" region="imagemRg"/>
<descriptor id="botomS1D" region="botomS1Rg" focusIndex="1" moveDown="2" moveUp="2"/>
<descriptor id="botomS2D" region="botomS2Rg" focusIndex="2" moveDown="1" moveUp="1"/>
<descriptor id="iconSD" region="iconSRg"/>
<descriptor id="iconED" region="iconERg"/>
<descriptor id="musicaD" explicitDur="15s">
<descriptorParam name="soundLevel" value="0"/>
<descriptorParam name="bassLevel" value="1"/>
<descriptorParam name="hightLevel" value="0.5"/>
</descriptor>
</descriptorBase>
<connectorBase>
<importBase documentURI="ufrbBase1.ncl" alias="marco"/>
<causalConnector id="onKeySelectionStopStart">
<connectorParam name="keyCode"/>
<simpleCondition role="onSelection" key="$keyCode"/>
<compoundAction operator="par">
<simpleAction role="start" max="unbounded" qualifier="par"/>
<simpleAction role="stop" max="unbounded" qualifier="par"/>
</compoundAction>
</causalConnector>
<causalConnector id="onKeySelectionSetStartStop">
<connectorParam name="keyCode"/>
<connectorParam name="var"/>
<simpleCondition role="onSelection" key="$keyCode"/>
<compoundAction operator="par">
<simpleAction role="start" max="unbounded" qualifier="par"/>
<simpleAction role="stop" max="unbounded" qualifier="par"/>
<simpleAction role="set" value="$var" max="unbounded" qualifier="par"/>
</compoundAction>
</causalConnector>
<causalConnector id="onKeySelectionStop">
<connectorParam name="keyCode"/>
<simpleCondition role="onSelection" key="$keyCode"/>
<simpleAction role="stop" max="unbounded" qualifier="par"/>
</causalConnector>
</connectorBase>
</head>
<body>
<port id="begin" component="musica"/>
<media type="application/x-ginga-settings" id="nSet">
<property name="op"/>
</media>
<media id="apresentacao" src="entrada.jpg" type="image/jpeg" descriptor="fundoD">
<area id="temp" end="15s"/>
</media>
<media id="musica" src="musicaEN.mp3" descriptor="musicaD"/>
<media id="iconS" descriptor="iconSD" src="botaoVm.gif">
<area id="tempI" begin="2s"/>
</media>
<media id="botomS1" descriptor="botomS1D" src="botaoV.gif"/>
<media id="botomS2" descriptor="botomS2D" src="botaoVm.gif"/>
<media id="canto" descriptor="imagemD" src="entrada.jpg"/>
<media id="fundo" descriptor="fundoD" src="fundo.png"/>
<switch id="op">
<bindRule constituent="texto1" rule="r2"/>
<bindRule constituent="texto2" rule="r1"/>
<media id="texto1" descriptor="fundoD" src="texto1.txt"/>
<media id="texto2" descriptor="fundoD" src="texto2.txt"/>
</switch>
<link id="apresentacaoMusica" xconnector="marco#onBeginStartN">
<bind role="onBegin" component="musica"/>
<bind role="start" component="apresentacao"/>
<bind role="start" component="iconS" interface="tempI"/>
</link>
<link id="sairEN" xconnector="onKeySelectionStopStart">
<linkParam name="keyCode" value="ENTER"/>
<bind role="onSelection" component="iconS"/>
<bind role="stop" component="apresentacao"/>
<bind role="stop" component="musica"/>
<bind role="start" component="botomS1"/>
<bind role="start" component="botomS2"/>
<bind role="start" component="canto"/>
<bind role="start" component="fundo"/>
</link>
<link id="menu1" xconnector="onKeySelectionSetStartStop">
<bind role="onSelection" component="botomS1">
<bindParam name="keyCode" value="ENTER"/>
</bind>
<bind role="set" component="nSet" interface="op">
<bindParam name="var" value="1"/>
</bind>
<bind role="start" component="op"/>
<bind role="stop" component="botomS1"/>
<bind role="stop" component="botomS2"/>
<bind role="stop" component="canto"/>
<bind role="stop" component="iconS"/>
</link>
<link id="menu2" xconnector="onKeySelectionSetStartStop">
<bind role="onSelection" component="botomS1">
<bindParam name="keyCode" value="ENTER"/>
</bind>
<bind role="set" component="nSet" interface="op">
<bindParam name="var" value="2"/>
</bind>
<bind role="start" component="op"/>
<bind role="stop" component="botomS1"/>
<bind role="stop" component="botomS2"/>
<bind role="stop" component="canto"/>
<bind role="stop" component="iconS"/>
</link>
<link id="end" xconnector="onKeySelectionStop">
<bind role="onSelection" component="iconS">
<bindParam name="keyCode" value="RED"/>
</bind>
<bind role="stop" component="op"/>
<bind role="stop" component="botomS1"/>
<bind role="stop" component="botomS2"/>
<bind role="stop" component="canto"/>
<bind role="stop" component="fundo"/>
<bind role="stop" component="iconS"/>
</link>
</body>
</ncl>
Autor: Marco Aurélio Mendonça
1Um comentário