?
Solved

Button behind a button

Posted on 2009-05-06
4
Medium Priority
?
171 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 22

Accepted Solution

by:
rascalpants earned 1500 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 1500 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 1500 total points
ID: 24436027

^ bump ^
 

please come back and finish up this question...


thanks,

rp / Zone Advisor
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to record live broadcast.
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.
Suggested Courses

743 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