Results 1 to 2 of 2

Thread: scripting a symbol to resize

  1. #1
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default 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?

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Code:
    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.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. The Following User Says Thank You to BLiZZaRD For This Useful Post:

    evan (03-03-2008)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •