锁定老帖子 主题:简单Flex示例_登录
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-02-18
<?xml version="1.0" encoding="utf-8"?>
<!-- about state --> 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2009-02-19
Severity and Description Path Resource Location Creation Time Id
找不到类型,或者它不是编译时常数: states。 [Generated code (use -keep to save): Path: states-generated.as, Line: 230, Column: 14] traning Unknown 1235013343953 2106 我只要在<mx:State>中写上东西,无论是<mx:AddChild>还是<mx:SetProperty>都会报错!不知道什么原因。。。 |
|
返回顶楼 | |
发表时间:2009-02-19
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:states> <mx:State name="OK"> <mx:RemoveChild target="{btn}"/> </mx:State> </mx:states> <mx:Script> <![CDATA[ private function todo():void { currentState = "OK"; } ]]> </mx:Script> <mx:Panel id="p1" width="250" height="200" title="测试State" resizeEffect="Resize" horizontalCenter="0" verticalCenter="-2" > <mx:Button id="btn" click="todo();"> <mx:label>点我</mx:label> </mx:Button> </mx:Panel> </mx:Application> 就是这段代码 |
|
返回顶楼 | |
发表时间:2009-02-19
czwlucky 写道 <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:states> <mx:State name="OK"> <mx:RemoveChild target="{btn}"/> </mx:State> </mx:states> <mx:Script> <![CDATA[ private function todo():void { currentState = "OK"; } ]]> </mx:Script> <mx:Panel id="p1" width="250" height="200" title="测试State" resizeEffect="Resize" horizontalCenter="0" verticalCenter="-2" > <mx:Button id="btn" click="todo();"> <mx:label>点我</mx:label> </mx:Button> </mx:Panel> </mx:Application> 就是这段代码 测试过你的那段代码没有问题,加了<mx:AddChild>也可以的,代码: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:states> <mx:State name="OK"> <mx:RemoveChild target="{btn}"/> <mx:AddChild > <mx:Label text="Hello" color="red" fontSize="20"/> </mx:AddChild> </mx:State> </mx:states> <mx:Script> <![CDATA[ private function todo():void { currentState = "OK"; } ]]> </mx:Script> <mx:Panel id="p1" width="250" height="200" title="测试State" resizeEffect="Resize" horizontalCenter="0" verticalCenter="-2" > <mx:Button id="btn" click="todo();"> <mx:label>点我</mx:label> </mx:Button> </mx:Panel> </mx:Application> 自己再试试吧 |
|
返回顶楼 | |
浏览 4272 次