HERE
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class SceneJumpDemo extends MovieClip
{
var bones:Bones;
var snakes:Snakes;
public function SceneJumpDemo()
{
bones = new Bones();
snakes = new Snakes();
addChild(bones);
bones.addEventListener(MouseEvent.CLICK, onBonesClick);
snakes.addEventListener(MouseEvent.CLICK, onSnakesClick);
}
function onBonesClick(event:MouseEvent):void
{
addChild(snakes);
removeChild(bones);
}
function onSnakesClick(event:MouseEvent):void
{
addChild(bones);
removeChild(snakes);
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment