A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Resetting _x,_y,_ and scale?

  1. #1

    Resetting _x,_y,_ and scale?

    Hello All,

    Long Long time lurker. Anywho, I know my way around mx alright for most things but when it comes to code it's all just annoying to me, but Im dying to become proficient in it. FlashKit and Kirupa have always been a great resources for me, and Ive searched through the posts, but everyone codes so differently I get confused.

    My issue is simply resetting the _x,_y, and scale of a movie clip after it's been changed through AS. I am using loadMovie to load external SWF's then adjusting placement of the loaded movie through a submenu using actionscript. My issue is how to reset the _x,_y and scale to 0,0,100 when you select the next portfolio piece.

    Attached you'll find my nasty test movie with horrid code any help getting this to work will be greatly apprieciated. The positioning isn't set exact in this file but you'll get the gist. If I wasn't a poor human being I'd offer money but as I have none all I can offer is an illustration or custom illustrated desktop to whoever can help this wanna-be.

    Take Care,
    ID
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Feb 2002
    Posts
    536
    Code:
    function rePosition() {
    	this.pieceDes.gotoAndStop(2);
    	this.portImage.new_posi1 = 0;
    	this.portImage.new_posi2 = 0;
    	this.portImage.new_width = 100;
    	this.portImage.new_height = 100;
    	this.portImage._x = this.portImage._y = 0;
    	this.portImage._xscale = this.portImage._yscale = 100;
    }
    that should do the trick!

  3. #3
    Thank You. Works perfect.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center