Apache flex AdobeFlashBuilder:可视化组件不是';t显示
我卡住了。我一直在尝试使用Apache flex AdobeFlashBuilder:可视化组件不是';t显示,apache-flex,actionscript,air,adobe,flash-builder,Apache Flex,Actionscript,Air,Adobe,Flash Builder,我卡住了。我一直在尝试使用adobeflashbuilder运行简单的应用程序,但运气不好 它非常简单,我甚至没有在任何类型的模拟器/设备上显示视觉元素,如按钮 我接着看了一些视频教程,似乎一切都配置正确,没有出现错误,但问题是当我在设备/模拟器/airiOS/Android甚至realiOS设备上启动应用程序时,它仍然是空的。。。。空的只有白色屏幕 <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="
adobeflashbuilder
运行简单的应用程序,但运气不好
它非常简单,我甚至没有在任何类型的模拟器/设备上显示视觉元素,如按钮
我接着看了一些视频教程,似乎一切都配置正确,没有出现错误,但问题是当我在设备/模拟器/air
iOS/Android
甚至realiOS
设备上启动应用程序时,它仍然是空的。。。。空的只有白色屏幕
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160"
applicationComplete="init(event)">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Button id="button1" x="100" y="58" label="300ms"/>
<s:Button id="button2" x="200" y="58" label="500ms"/>
<s:Button id="button3" x="300" y="58" label="1000ms"/>
<fx:Script>
<![CDATA[
import com.adobe.nativeExtensions.Vibration;
private var vibrate:Vibration
private function init(evt:Event):void
{
trace("We are here");
if(Vibration.isSupported)
{
setupButtons();
} else {
trace("Vibration is not supported");
}
}
private function setupButtons():void
{
button1.addEventListener(MouseEvent.CLICK, handleButtons);
button2.addEventListener(MouseEvent.CLICK, handleButtons);
button3.addEventListener(MouseEvent.CLICK, handleButtons);
vibrate = new Vibration();
}
private function handleButtons(event:MouseEvent):void
{
switch (event.currentTarget.id)
{
case "button1":
vibrate.vibrate(300);
break;
case "button2":
vibrate.vibrate(500);
break;
case "button3":
vibrate.vibrate(1000);
break;
}
}
]]>
</fx:Script>
</s:Application>
至少应显示3个按钮。在控制台中调试时没有有用的信息,-init()方法中没有断点停止
我对我的第一次会议flashbuilder
和为移动平台开发感到非常沮丧。
Flash Builder 4.7
提前感谢我认为初始化代码出现崩溃,请尝试删除所有行,然后在works中逐个添加脚本行,直到找到问题。调试时是否收到跟踪消息?它可能是一些阻止应用程序完成初始化的异常(尝试注释所有的init代码,只保留mxml,看看是否得到按钮)不,我没有得到任何调试信息如果我删除了部分,它会工作我正在尝试这样做。。。带有just trace line的Empty init()方法工作得很好,但我不知道是否应该接受这个答案,因为它不是答案本身。看起来更像是注释…@Injectios我很难找到有问题的行,即使我使用完全相同的代码,这里也不会发生(我可能有不同版本的东西)但是init函数中的一个错误的答案是正确的,这为您指明了正确的方向A,5分钟后您可以用有问题的行返回给我,我可以提供更多帮助,这也是我的问题好的,所以空屏幕是由导入振动扩展引起的。但我希望我是以正确的方式进口的