ActionScript3.0的的MouseEvent和TextChange [英] ActionScript3.0 MouseEvent and TextChange

查看:222
本文介绍了ActionScript3.0的的MouseEvent和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?

  1. 在影片剪辑点击
  2. CTRL + B
  3. 属性更改为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.

DragAndDrop_Modification

呵呵,和类名必须是启动一个大写字母。这当中,开发商惯用的承诺。

Oh, and by the Class name must be start a capital letter. This is customary promise among the developers.

古德勒克

这篇关于ActionScript3.0的的MouseEvent和TextChange的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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