Solved

Button behind a button

Posted on 2009-05-06
4
168 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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 load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

829 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