dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Buttons and effects

  1. #1
    Member
    Join Date
    Mar 2004
    Posts
    53

    Buttons and effects

    Hello!

    I would really apreciate any help with this.

    I have a button, when you move your mouse over it the background changes with a transition from one colour to another and when you move the mouse away the background changes back. The problem is I don't have a clue how to make a backward transition, so the background doesn't change immediately but after a motion sequence, the same way it chenged when you move your mouse over the button. Please see the example.

    Thanks for helping

    Best wishes

    theredtitan
    Attached Files Attached Files

  2. #2
    Moderator 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";
    }

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

    theredtitan

  4. #4
    Junior Member
    Join Date
    Jun 2006
    Posts
    1

    Button States Get Lost

    I have created buttons, then when I set my button with an action (getURL), it loses the states. So, when I go to my site, I can mouse over it and the mouse over state is not there...neither is down, etc..... The button will go to the specified URL, but it is just stationary.

    Can someone kindly assist me?

    Thank-you

  5. #5

  6. #6
    Member
    Join Date
    Mar 2004
    Posts
    53
    Hi!

    I have tried your method, but I have a problem, my objective is to have a button which would trigger a fullscreen colour or picture change, but if you rollout from the button it changes back, I would use at least 5 buttons all over the screen with the same function, each would trigger a fullscreen background change.

    With the script you provided, thanks again, I have a problem that when the colour change appears it doesn't fade away if I rollout from the button unless I go outside the swf window.

    How can I fix this?

    Thanks

    Best wishes

    theredtitan
    Attached Files Attached Files
    • File Type: fla 1.fla (64.0 KB, 118 views)

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