Thanks, rob1221.
Below is the code. And, the screenshot of the behavior is also attached. For each step, I use exactly the same logic as what's shown on the screenshot as well as the below code, except the actors are different. Just don't know why it doesn't work at the last step.
public dynamic class Design_1_1_Select extends ActorScript
{
override public function init():void
{}
override public function update():void
{
if (actor.isMousePressed())
{
recycleActor(actor);
createActor(getActorType(23), 565, 168, FRONT);
}
}
override public function handleCollision(event:Collision):void
{
}
override public function draw(g:Graphics, x:Number, y:Number):void
{
}
public function Design_1_1_Select(actor:Actor, scene:GameState)
{
super(actor, scene);
nameMap["Actor"] = "actor";
}
override public function forwardMessage(msg:String):void
{
}
}