ActionScript3.0的的MouseEvent和TextChange [英] ActionScript3.0 MouseEvent and TextChange
问题描述
我想作一个外部ActionScript 3,当 MOUSE_UP
的文本将更改,当 MOUSE_DOWN
无文本将被显示出来。
I'd like to make an external ActionScript 3 that when MOUSE_UP
the text will change and when MOUSE_DOWN
no text will be displayed.
这是在code,我做:
This is the code that I made:
this.parent.getChildByName("planet_name").text = "EARTH";
我只是做C到显示该点$ C $。 = P
I just made this code up to show point. =P
推荐答案
请首先检查。 this.parent.getChildByName(plant_name)是无论DynamicText与否
Please check first. this.parent.getChildByName("plant_name") is Whether DynamicText or not
如果没有,则必须更改DynamicText的实例。
If not, you must change instance of DynamicText.
什么是plant_name的实例?如果是影片剪辑实例,你改变DynamicText。
what is "plant_name" instance ? if is instance of MovieClip, you change DynamicText.
如何变化?
How to changed?
- 在影片剪辑点击
- CTRL + B
- 属性更改为DynamicText
我将省略更详细的说明。源$ C $ C,请参考以下链接。 正如你将看到源$ C $ C,有DragAndDrop类。 这个类此类对象的舞台上所有的初始化中的作用,并负责管理。
I will omit a more detailed description. the source code, refer to the following link. As you will see the source code, There are a DragAndDrop Class . this Class The role of this class of objects on the stage all the initialization and is responsible for managing.
呵呵,和类名必须是启动一个大写字母。这当中,开发商惯用的承诺。
Oh, and by the Class name must be start a capital letter. This is customary promise among the developers.
古德勒克
这篇关于ActionScript3.0的的MouseEvent和TextChange的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!