A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Buttons and effects

Hybrid View

  1. #1
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    Hi, that is the problem with using buttons lik this..

    you will need to use a movieClip instead.

    example:

    make a new movieClip
    on frame 1-10 you have your background color change

    on frame 1: you have a stop(); action & a delete action, like this:
    Code:
    stop();
    delete this.onEnterFrame();
    now make a new layer (call it actions layers)
    put this code on it:
    Code:
    this.onRollOver = function() {
    	direction = "play";
    	this.onEnterFrame = function() { 
    		if (direction == "play") { 
    			this.gotoAndPlay (nextFrame());
    		}else if (direction == "rewind") { 
    			gotoAndStop (prevFrame());
    		} 
    	} 
    }
    this.onRollOut = function() {
    	direction = "rewind";
    }

  2. #2
    Member
    Join Date
    Mar 2004
    Posts
    53
    Thanks, will try the code.

    theredtitan

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