Solved

Button behind a button

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
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.

746 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

11 Experts available now in Live!

Get 1:1 Help Now