View Full Version : scripting a symbol to resize
I'm relatively new to actionscript, figured out how to drag and drop, but what if I want to stretch and resize it. I don't think it will be as easy. Got a site that talks about it?
Also can anyone recommend a good actionscript reading that is more intermediate for someone with basic knowledge?
BLiZZaRD
02-29-2008, 08:41 PM
my_mc.onPress = function(){
var xpos = _xmouse;
var ypos = _ymouse;
var currentScaleX = this._xscale;
var currentScaleY = this._yscale;
this.onEnterFrame = function(){
this._xscale = currentScaleX+(_xmouse-xpos);
this._yscale = currentScaleY+(_ymouse-ypos);
}
}
my_mc.onMouseUp = function(){
delete this.onEnterFrame;
}
There is a lot you can do here, add a specific hit area, so the user can only drag from one edge, etc.
as for reading... online is best. Books are good but expensive and the same info can be found online for free. Google for "Flash ActionScript tutorials" or the like.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.