A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How to swap 2 instances with actionscript?

  1. #1
    Member
    Join Date
    Mar 2005
    Posts
    44

    How to swap 2 instances with actionscript?

    Like how button switches when mouse rollover and mouse rollout, except I don't want button, I need to achieve this effect with movieclip. Thx

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Location
    Saginaw, MI
    Posts
    185
    have a moveclip with two pictures, 1-the original pictures and 2-the picture that you want to appear when you roll over it. then attach these actions to it

    Code:
    onClipEvent (load) {
    	this.stop();
    }
    onClipEvent (enterFrame) {
    	this.onRollOver = function() {
    		this.gotoAndStop(2);
    	};
    	this.onRollOut = function() {
    		this.gotoAndStop(1);
    	};
    }
    I am determined to make better mistakes tomorrow.

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