我有2节课.第一个是命名测试,如下所示:
import textbox
class test:
a=textbox("test")
a.run()
Run Code Online (Sandbox Code Playgroud)
第二个类是文本框,如下所示:
class textbox():
def __init__(self, string):
self.string=string
def run(self):
print string
Run Code Online (Sandbox Code Playgroud)
我收到这个错误
File "C:\Users\User\Desktop\edoras\gui\test.py", line 4, in test
a=textbox("test")
TypeError: 'module' object is not callable
Run Code Online (Sandbox Code Playgroud)
我使用pydev eclipse插件
我有一个名为button1的影片剪辑,在这个影片剪辑中有一个名为txt的动态文本
public function mouse_down(event:MouseEvent)
{
if(event.target==button1)
{
...//this only recognizes when i click the button without intersecting the dynamic text area
}
if(event.target==button1||event.target==button1.txt)
{
...//this works
}
Run Code Online (Sandbox Code Playgroud)
我想知道为什么它不能识别包含动态点击的区域中的点击,如果我没有指定它,因为txt是button1的一部分,所以通常我只需要检查目标是否是button1但是它不起作用:我还必须检查目标是否是button1.txt
谢谢你的帮助!