here;s something
var javaMap:MovieClip;
//this turns the mc into a button
scaleUp.buttonMode = true;
//this allows flash to react to someone clicking on the mc
scaleUp.addEventListener(MouseEvent.CLICK, onClick)
function scaleMapUp(java:MovieClip):void
{
java.x -= .7;
java.y -= .7;
}
//this is what will happen when someone clicks on that mc box1
function onClick(event:MouseEvent):void
{
java.scaleX+=.02;
java.scaleY+=.02;
}
//box 2 is the pinkish one and it is the one that is going to scale the map smaller...
function scaleMapDown(java:MovieClip):void
{
java.x += 1;
java.y += 1;
}
//this scales the map
scaleMapDown(java);
//this turns the mc into a button
scaleDown.buttonMode = true;
scaleDown.addEventListener(MouseEvent.CLICK, onClickDown)
function onClickDown(event:MouseEvent):void
{
//event.target.scaleX+=-.02;
//event.target.scaleY+=-.02;
java.scaleX+=-.02;
java.scaleY+=-.02;
}
Flash zoom in movie clip and re-scale (Website Design Tips)
No comments:
Post a Comment