Link to home
Start Free TrialLog in
Avatar of JQuartermaine
JQuartermaine

asked on

button aniamtion

how do i make an animation for when i move the cursor off the button?
here is the site with the buttons im trying to animate          http://www.capesiderecords.com/index.swf
what i want this to end up doing is rotate up when you move your cursor over and rotate back down after you ahve move it away.
 please send anything you know of that will help me with this

Thanks  -TIM
Avatar of negatyve
negatyve

You can do it with this code:

button_mc.onRollOver = function()
{
      this.onEnterFrame = function()
      {
            if(this._rotation > -90){
                  this._rotation -= 3;
            } else {
                  this._rotation = -90;
                  delete this.onEnterFrame;
            }
      }
};
button_mc.onRollOut = function()
{
      this.onEnterFrame = function()
      {
            if(this._rotation < 0){
                  this._rotation += 3;
            } else {
                  this._rotation = 0;
                  delete this.onEnterFrame;
            }
      }
}
Avatar of JQuartermaine

ASKER

Thanks for the reply negatyve.

  but im still haveing problems with this. I don't know where you want me to enter that code. i tried placeing it the same place i would put my (on release goto) script but when i tried this it said i had 2 errors.
 also i don't think this code will help me for other button animations im working on. so to give a better example. I have made a button that has a RollOver animation but to illistrat what i want the RollOut to look like i made the button go to a new rollOver animation.  please take a look at what i mean-------->      http://www.geocities.com/tdz_design/buttonAnim.swf

if you think you know how to make this happen please help. i need all the help i can get :)
Oh, I think that the knot is the way you create your buttons. If I could see a fla with just a couple of buttons, relative in and out animations, and your actual script, I could modify it to suit your needs in one minute..
ok negatyve
do you want me to send you this fla. by email

if you do and you don't want to post your email address you can send me your address to my mail---> tdz_design@yahoo.com

-Tim
well, you should post it on a public webserver (due to EE guidelines). just remove everything else, leave only buttons, animations, and buttons code
here is the address you can download the fla file from--->   http://www.geocities.com/tdz_design/EE-BUTTON.swf

if there is any problems jsut let me know
thanks negatyve

is there anyway you would be able to tell me the steps you took to change it. or do you think its to much info for a post
ASKER CERTIFIED SOLUTION
Avatar of negatyve
negatyve

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks negatyve

i think this is a little to advanced for me. because i don't know script very well.