flex:1120访问未定义的属性 [英] flex: 1120 access to undefined property

查看:167
本文介绍了flex:1120访问未定义的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我无法在图片中加入所需的效果。我是获取错误
120访问未定义的属性....指向HSlider / change。

什么是错误/解决方案?

 <?xml version =1.0encoding =utf-8?> 
< mx:HBox top =10left =10>
< mx:HSlider top = - 10left =100value = - 10toolTip =Rotation
change =myImg.rotation = event.currentTarget
liveDragging = 真 >
< / mx:HSlider>
< / mx:HBox>
< mx:CheckBox label =Visiblechange =myImg.visible = event.currentTarget.selected
selected =true/>
height =100top =60 left =30rotation = - 10>
< mx:filters>
< mx:DropShadowFilter />
< / mx:filters>
< / mx:图片>
< / mx:Application>

在Hslider / Change属性中应该是

 myImg.rotation = event.currentTarget.valueOf()或
myImg.rotation = event.currentTarget.value

提前致谢

解决方案

感谢您的代码。



这可能是一个复制/粘贴问题,但您发送的代码片段有一个主要问题:

图片名称是 myImg ,而在整个片段中,它被称为 myimg 。让我们知道,如果这是一个复制错字或实际的错误。






name = 对于你的图片应该是 id = 。当你在应用程序的其余部分引用组件时,你可以通过它没有设置的ID来完成。

 < ; mx:Image id =myImgsource ... 


I was trying to place some simple effects on an image using HBox using Hslider/Checkbox.

I am unable to incorporate the required effects on the image.I an getting the errors "120 access to undefined property" ....poinying to "HSlider/change".

What can be the error/solution to this?

<?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:HBox top="10" left="10">
       <mx:HSlider top="-10" left="100" value="-10" toolTip="Rotation" 
             change="myImg.rotation=event.currentTarget"    
                            liveDragging="true">
       </mx:HSlider>
      </mx:HBox>
      <mx:CheckBox label="Visible" change="myImg.visible=event.currentTarget.selected"          
          selected="true"/>
      <mx:Image name="myImg" source="file:///C|/Users/terry/Desktop/test/myImage.jpg" 
                       height="100" top="60" left="30" rotation="-10">
           <mx:filters>
             <mx:DropShadowFilter />
        </mx:filters>
        </mx:Image>
    </mx:Application>

further in the "Hslider/Change" attribute it should be

"myImg.rotation=event.currentTarget.valueOf()" or 
"myImg.rotation=event.currentTarget.value"

Thanks in advance?

解决方案

Thanks for the code.

This might be a copy/paste issue, but the code snippet you sent has one major problem:

The Image name is myImg, whereas it's referred to as myimg throughout the snippet. Let us know if that's a copy typo, or an actual bug.


The name= for your Image should be id=. When you refer to the component within the rest of the application, you do so via its ID which wasn't set.

<mx:Image id="myImg" source...

这篇关于flex:1120访问未定义的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆