zhining
游民
积分:50

为什么模拟器在运行的时候会突然终止?

我刚开始学这个,遇到了一个小的问题:在我编译我的程序的时候,openface.exe会突然终止,下面是我test的代码。如果有什么解决办法,望不吝赐教,对于任何一个回复,我都会感激不尽的!









zhining
游民
积分:50

<?xml version="1.0" encoding="utf-8"?>
<canvas>
	<view width="240" height="320" bgcolor="#ffffff" id="v1">
		<text name="lb" x="13" y="100" fgcolor="#000fff" fontsize="20" text="Hello, Li Zhi Ning!"/>
//		<handler name="onkeydown" args="key" reference="lzKeys"><![CDATA[
//			switch(key){
//				case 38: //up
//					up(-1);
//					break;
//				case 40: //down
//					up(1);
//					break;
//				case 13:
//					if(v1.getAttribute("bgcolor") == 0xffffff){
//						v1.setAttribute("bgcolor", red);
//						v1.lb.setAttribute("fgcolor", red);
//					}else{
//						v1.setAttribute("bgcolor", 0xffffff);
//						v1.lb.setAttribute("fgcolor", red);
//					}
//					break;
//				case 33:
//				case 4108:  //left button
//					v1.lb.addtoclips_anm.doStart();
//					break;
//			}
//		]]></handler>
	<animatorgroup name="addtoclips_anm" duration="1000" process="simultaneous" start="false">
		<animator attribute="opacity" from="0" to="1" />
		<animator attribute="fontsize" from="1" to="18" />
	</animatorgroup>
	</view>
</canvas>

nancy
版主
积分:2542

你的代码没有贴完整,请重新贴一下

另外,贴代码的时候,请将代码放至 中间,这样论坛中才能正确显示你贴出的代码

你的回帖已经帮你编辑,并已经将代码[code]框出。但是代码不完整

zhining
游民
积分:50

我的代码就是http://www.openface.org.cn/helloExample网页中,“在lzx文件中如果要能够接受到键盘事件,需要定义一个onkeydown的handler事件,如在上面的应用中加入如下代码,如:”后面的一个例子

nancy
版主
积分:2542

你调用的up()函数的实现在哪里?