Solved

Button behind a button

Posted on 2009-05-06
4
166 Views
Last Modified: 2013-11-11
In Flash 8: I have a button behind a button. So far I can see both buttons. One straight up, and the other one curved. I would like the behind curved button to not show until the first button is passed over by the mouse. That does not seem to be working.
I would like action added to the back button without disturbing the front button.
The first button does disappear with mouse over. But that's about it.
0
Comment
Question by:lbusche
  • 3
4 Comments
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 24326012
you should not be using button objects... you should be using Movieclips and programming the roll over states with Actionscript.

this way you can run functions that utilize conditional statements in any way you want.



rp / ZA
0
 

Author Comment

by:lbusche
ID: 24337160
I actually would like the front button to show on startup of the movie. Then on mouse over I would like it to disappear and the back button will show. On mouse click to either one I would like to go to another page.  I want it to look like the button pops up. I think I will just make it a moving button.
Thanks
0
 
LVL 22

Assisted Solution

by:rascalpants
rascalpants earned 500 total points
ID: 24341482
You should actually use a Tween class for this effect... when you roll over something, you can just Tween the clip to the size you want.

here is a very simple Class to implement... you just copy the "gs" folder to the same directory as your main SWF, and then use this code to access it...

AS 2.0 = http://blog.greensock.com/tweenmaxas2/
AS 3.0 = http://blog.greensock.com/tweenmaxas3/

import gs.TweenMax;
import gs.easing.*;


unless you are wanting the image to be different.  if that is the case, then you would just have one master MovieClip, that has your other two MovieClips inside of it...

you use the master clip as the one that is used with code like this...

masterClip.onMouseOver = function(){
  this.clip1._alpha = 0;
  this.clip2._alpha = 100;
}

masterClip.onMouseOut = function(){
  this.clip1._alpha = 100;
  this.clip2._alpha = 0;
}

masterClip.onRelease = function(){

  trace("you clicked on the button");

}


the above is basic AS 2 code, please let me know if you need the AS 3.0 code...  I just assumed you would be using AS 2.


rp / ZA

0
 
LVL 22

Assisted Solution

by:rascalpants
rascalpants earned 500 total points
ID: 24436027

^ bump ^
 

please come back and finish up this question...


thanks,

rp / Zone Advisor
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now