这是我的代码。
package core
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.geom.Point;
public class earth extends MovieClip
{
protected var position:Point = new Point(x, y);
public function earth()
{
stage.earthText_mc.visible = false; //HAVING PROBLEM WITH THIS LINE
buttonMode = true;
addEventListener(MouseEvent.MOUSE_DOWN, down);
}
protected function down(event:MouseEvent):void
{
parent.addChild(this);
startDrag();
addEventListener(MouseEvent.MOUSE_UP, up);
}
protected function up(event:MouseEvent):void
{
stopDrag();
if(dropTarget)
{
if(dropTarget.parent.name == "mercury_drop")
{
x = position.x = 279.95;
y = position.y = 267.15;
}
else if(dropTarget.parent.name == "venus_drop")
{
x = position.x = 342.55;
y = position.y = 267.15;
}
else if(dropTarget.parent.name == "earth_drop")
{
x = position.x = 418.2;
y = position.y = 267.15;
}
else if(dropTarget.parent.name == "mars_drop")
{
x = position.x = 497.6;
y = position.y = 267.15;
}
else if(dropTarget.parent.name == "jupiter_drop")
{
x = position.x = 613.65;
y = position.y = 267.15;
}
else if(dropTarget.parent.name == "saturn_drop")
{
x = position.x = 738.4;
y = position.y = 267.15;
}
else if(dropTarget.parent.name == "uranus_drop")
{
x = position.x = 844.8;
y = position.y = 267.15;
}
else if(dropTarget.parent.name == "neptune_drop")
{
x = position.x = 939.65;
y = position.y = 267.15;
}
else
{
x = position.x = 517.2;
y = position.y = 35.5;
}
}
}
}
}
我想要的只是在我打开运行闪光灯时使文本“EARTH”不可见,仅使用代码..但我无法连接到影片剪辑“earthText_mc”。该脚本仅在“earth_mc”处连接..我不知道如何调用其他电影剪辑并使它们按照我的意愿可见或不可见..