Question
scaling a movieclip...scaling whole stage instead...
Hello,
I have a button that adds instances of a movie clip to the stage. I want to be able to scale the movie clip after it has been loaded to the stage. The following code works, but it scales eveything on the stage, not just the movie clip instance. Any help would be appreciated.
Thanks,
Muhl
on (release) {
mc3 = attachMovie ("square", "square" + counter, counter + 4);
counter++;
mc3._x = 200;
mc3._y = 200;
mc3.onPress = function() {
this.startDrag();
}
mc3.onRelease = function() {
this.stopDrag();
}
mc3.onKeyDown = function(){
if(Key.isDown(Key.RIGHT)){
scale = _xscale + 10;
_xscale = scale
//trace("the bos should be scales larger");
}
if(Key.isDown(Key.UP)){
scale = _yscale + 10;
_yscale = scale
}
if(Key.isDown(Key.DOWN)){
scale = _yscale - 10;
_yscale = scale
}
if(Key.isDown(Key.LEFT)){
scale = _xscale - 10;
_xscale = scale
}
}
Key.addListener(mc3);
}
I have a button that adds instances of a movie clip to the stage. I want to be able to scale the movie clip after it has been loaded to the stage. The following code works, but it scales eveything on the stage, not just the movie clip instance. Any help would be appreciated.
Thanks,
Muhl
on (release) {
mc3 = attachMovie ("square", "square" + counter, counter + 4);
counter++;
mc3._x = 200;
mc3._y = 200;
mc3.onPress = function() {
this.startDrag();
}
mc3.onRelease = function() {
this.stopDrag();
}
mc3.onKeyDown = function(){
if(Key.isDown(Key.RIGHT)){
scale = _xscale + 10;
_xscale = scale
//trace("the bos should be scales larger");
}
if(Key.isDown(Key.UP)){
scale = _yscale + 10;
_yscale = scale
}
if(Key.isDown(Key.DOWN)){
scale = _yscale - 10;
_yscale = scale
}
if(Key.isDown(Key.LEFT)){
scale = _xscale - 10;
_xscale = scale
}
}
Key.addListener(mc3);
}