Flex 错误集合 5-28

本文解决了在使用Flex Builder创建项目时遇到的“An unknown item is declared as the root of your MXML document”错误及“mx”前缀未绑定的问题。通过正确配置本地Flex SDK并确保<mx:Script>标签位于组件标签内,可以有效避免这些错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

又很久没有碰flex了,今天打开flexbuilder 新建一个新的 flex项目,但是在打开Design画面的时候,出现了

"An unknown item is declared as the root of your MXML document. Switch to source mode to correct it"

错误,在网上找到原因,原来是flex的sdk 没有添加,只要添加的本机上的flex sdk就好了。

 

 

出现错误 The prefix "mx" for element "mx:Script" is not bound.

 

从 http://blog.flashgen.com/2006/10/30/flex-2-mxml-component-development/  看到下面一段话

 

What if we need to add functionality to our component? Well we can do that too. However you must remember not to put your <mx:Script></Script> tag or any other come to that, outside of your base component tag otherwise it will error along these lines: “The prefix “mx” for element “mx:Script” is not bound”

 

大致意思是说,要把 <mx:Script> 添加组件当中在反观一下自己的代码发现确实没有包含组件中

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值