Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Copying Over State Of Button



Hello,

I am currently making a HTML version of my company's website which has been designed in flash. The whole thing's gone really well until the VERY LAST thing I have to do, which is copy an image that is the submit button on a form.

The up image is fine - I've been able to hide all other layers, modify canvass size etc so it can be exported. It's the rollover part that's causing trouble.

The rollover isn't a library item & I can only seem to get to it by double clicking the form part, as if to edit that, then double clicking the button as if to edit that, and the rollover image is in the second frame on that screen.

(as you've probably guessed, I've not used Flash before)

Does anyone have any idea of what I can do to make a copy of this part of the flash movie so I can export it for using in a HTML only site?



Tek-Tips > Adobe(Macromedia): Flash Forum
Posted on: 26 Mar 03 12:05


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Down State In Drop Down Menu-then Return To Up State When Other Button Is Clicked?
Hi - nice to meet everyone,

The drop down menu I'm referring to is located in the main movie. The menu is a movie clip with the buttons inside and I have each button as 'track as menu item' in the properties. The buttons are linked to external swfs that load into an empty movie clip on the main stage. Everything loads perfectly no problem. The problem is that I can't seem to figure out the right code to put on the sub-menu items/buttons in the drop down menu to show the 'down' state when the corresponding movie is loaded (i.e., about-main button, philosophy [menu item], philosophy movie loaded). Then get it to go back to the 'up' state when another button is pressed in the same drop area part of the menu? I hope I explained myself clear enough without confusing anyone!

I would appreciate any help - I think I'm going to lose my mind - this is driving me crazy!!

Thanks - Allee

Active Button State/3 State Buttons
http://www.thecodebehind.com/code/flash ... state.aspx

Does anybody know anything about implmenting the above - but via an external class (.as) file?

I'm still learning, and so it's a bit much to wrap my brain around...

Copying Button Slows To A Crawl - HELP
I'm doing a sliding calendar thing. I have one button in 3 states made into a movie clip.
When I copy or duplicate the button and give it a new name to call up a different piece of dynamic text it works fine.
My problem is that the calendar I am doing represents 30 years and the more buttons I copy or duplicate (each month can have between 2 or 20 days of information) in order to give more information for more days, slows the overall movie down to a crawl even though the movie size is around 60kb.
How can I get around this???

Copying A Button Without Having An Effect On The Orginal, How Is This Done? Please
I have a button that is called "about us" which can be viewed at
www.hfchose.tk

I would now like to copy this button and change the copy to "stock" when do change the copy to "stock" it has the same effect on the orginal button.

How do i get round this?
Thanks
Aidan

Copying And Pasting Button, Modifying One Modifies All, UGH..
Ok, another question. I created a button called "HOME". Now, when I create the next button (which should look like the HOME button but with different text), I copy the button (using mouse rectangle select the button), and and paste it. I right-click the new button, modify the properties (change the text to "ABOUT" on all 4 instances, up, over, down, hit) and return to the main timeline.

As you experienced folks guessed, the text on the OLD button was changed just like the new button. Ok, what gives...

Zeus

FLASH 8 - Toggle Button/released State/pressed Button
I have a series of buttons inside an array. I am trying to get the buttons so that once they are pressed, they remain in the over state. Which is a darker color than the up state. So that people know which button they have pressed. Is there an easy way to do this for buttons?

Please help someone,
Thanks,
M

Button States - How To Keep Button On Rollover State When Clicked.
on (rollOver) {
this.btn_about.gotoAndPlay("mouseover");
setProperty(this.btn_about, _x, 25);
setProperty(this.btn_about, _y, 29);
}
on (rollOut) {
this.btn_about.gotoAndPlay("mouseout");
}

on(release){
_parent.gotoAndStop("about");
}

There's my button code. Now a rundown on my delima.

I have a movie "company.swf" that is loaded into an empty MC "content" that is located within my main movie "main.swf". My buttons are all located inside an MC "subnav" inside of company.swf. I have seperate MC's for each button with an actual button with just a "hit" area. I would like each button to stay in the rollover state when clicked so a user knows where they are in each section. I hope I'm being clear here. My rollover and rollout works fine.

Please help!! Thanks

Movie Clip Within Button - How Do You Disable Down State Of Button?
Hi - I have created a menu down the side of my flash site which is in the form of a button so that when the user rolls over the button, it brings up the menu. Within, this button is just text - the names for each page the user can select to go to (text is within movie clips so I can add actionscript to them).

However, I want to add on (press) {gotoAndPlay("home",1); } etc for each movie clip within this button but when i test the site, this code does not work as the buttons down state has priority over the movie clips within it.

Is there some actionscript code which could disable the down state of a button? (as i only need the button as a rollover anyway and i need the movie clips within the button to have priority in terms of actionscript for linkage etc)

Thanks

BUTTON ROLL OVER STATE TO STAY.. But Not A Button
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}

this is what i have to animate a button/movie clip - kinda like what www.newstoday.com has for their buttons.....
but when i press the button and go to a different section i want the over state to stay over...ive tried to add this but not sure where i going wrong...

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();

}

or do i need to go with a on script?
like this

Button Down State
I am trying to create a flash simulation of a security keypad. One of the required features is that a different action occur if the user holds down the button for 3 seconds rather than just releasing it. To accurately mimic the real-life keypad after the button has been held for three seconds certain lights should begin to flash and events trigger before the button is released.

I have tried countless things and none of them seem to be working. Is there a way to check the state of a button so I could do a "Do while" loop based upun it still being pressed?

Any nudging in the right direction is very appreciated.

Mc On Down State Of Button
If I create a movie clip that is the down state of a button how do I get it to finish playing even after button is released? Thanks

How Do You Set The State Of A Button With AS?
how do you set the state of a button with AS?

i have a button on the bottom of the stage, and another instance of the same button at the top of the stage (for visual effect). i'd like to make it so that when you roll over the instance of the button at the bottom of the stage, the instance at the top of the stage would show the rollover effect. any ideas? thanks in advance.

State Of Button
My requirement is that when I press a button the look of the button needs to change.In my case - a pause button - when clicked should change to a play button.

I've a deadline and I'm not getting anywhere.

Thanks

Hit State Button Help
ok, I put in an image inside of the already existing button, on the hit state of the button, how do i make it work when i click it????

Hit State Button Help
ok, I put in an image inside of the already existing button, on the hit state of the button, how do i make it work when i click it????

Hit State Button Help
ok, I put in an image inside of the already existing button, on the hit state of the button, how do i make it work when i click it????

On And Off State Of Button
Hi,
I have a button and it is suppose to bring up a pop up menu when a user hits it and when it is hit again (while the pop up menu is still up) the menu will disappear. This is what I have:

on (release) {
if(state=="off"){
state="on";
_root.gotoAndStop(65);
}
else
state="off";
_root.gotoAndStop(45);
}

However, this code doesn't work, I understand I need to initialize "state" somewhere, but I dunno how to or where to. how can I initialize the state? can someone help me please?
Thanks.

Button State
Hi there,

In my main swf i have 4 buttons.What I want to accomplish is this.

When I hit but 1 for instance the butons stays in the hit state.
If I then hit but2,3 or 4 but1 is back in the normal state but2,3or 4 is in the hit state visible.How do this?

You can see what I mean by going to this site for instance:
http://minkipark.com/

Hope someone can help.Big thx in advance.

Grtz

Button Over State
How do you enable the over state to remain visible after clicked, then go away when a different button is clicked and perform the same function?

Button Up State
Hello.

I am making a naviagation that fades out ounce you roll out of a button.

I have an up state with a nested movie clip to fade out.

It works, but it plays when you first enter the movie. This is annoying. How can I keep this wonderful roll out and get rid of the roll out animation when you first enter the movie.

Thank-you.

Button Down State
I'm not really a newb with flash but, I have never figured out an easy way to keep the state of a button, once it is selected, down. I used to just superimpose a phantom image of the button's down state over it when the timeline jumped to a selected frame. Is there an easier way to do this? Im no longer jumping to frames but instead loading movies, so this tactic doesnt work (and its a pain in the
$%#!)


Thanks for any advise. Much appreciated.

Button State?
Hi,

I have a button that has a different gfx for over, down and hit states.

I want to be able to have the button display one of these states when the user presses it and moves the mouse off.

How would I go about this?

Button State
Hi All,

Is it possible to disable a particular button state in the run time. i.e., A button having over, down state, when moves from frame 1 to 2 the down state should be disabled and when it comes back to frame 1 it should be enabled, I can't have two buttons for that and it got to be the same button

Hope its clear!!

Thanks in Advance

3 State Button
I would like to create a button (or perhaps a mc that acts like a button?) that has three states :

1. a normal "off" state

2. a highlighted "rollover" state (which amounts to putting a white square graphic behind the first, normal button)

3. an engaged, "clicked" state (with an additional black border around the white square rollover state) that remains a different button is clicked -- unlike the 'down' frame in a button symbol, which only remains WHILE the mouse is down.

Is it possible to do all of this via actionscript ?

I should say that I have about 30 of these to do, so I'd REAALLLLY like to find a way to do it with code.

Keep Button In Down State?
Hi all, I have a basic button question. (almost posted on the newbie board

I simply would like to have my button clicked on (downstate) and stay there until clicked again.

I haven't added any code, just using the standard button rollover feature.

thanks in advance... Laurel

[F8] Button Over State
www.majesticsales.com theres a button in the nav called "Specials" can anybody help me tweak it so it doesnt pop on and off when i pass by it, or stay on after i roll off of it!...

Specials is inside of a movie clip with an invisible button
onrollover on specials it gotoAndPlay's frame 5 where those 2 sub buttons show
rollout to gotoAndPlay frame 1

Thanks

[F8] Button State
how do i change a button state once a user clicks on it and i would like it to be different so you know what section you are in but i want to do it in action script and not in the time line

[F8] Down Button State Help
I created a button with a rollover state that makes an object tilt. I then want to animate a symbol shooting out of the tilted rollover object to occur by clicking. Currently, the only way the animation will play all the way through is if the user holds down the mouse button. Is there any way for the animation to play with a single click?

[F8] Down Button State Help
I created a button with a rollover state that makes an object tilt. I then want to animate a symbol shooting out of the tilted rollover object to occur by clicking. Currently, the only way the animation will play all the way through is if the user holds down the mouse button. Is there any way for the animation to play with a single click?

Button State
in my program i have a map of a building which consists of various buttons. Each of these button represent a different room. When the user clicks on a button they are taken to a new room (a new 360 panorama). I'd like the button which they clicked on to remain in an up state until they click on another button. Does anyone know how i could go about doing this?

Any help would be really appreciated, thanks!

Button On State?
Hey guys,

First of all I'd like to thank everyone who's helped me so far in getting on board with AS3. It's been a tough transition for me from AS2, but I've really been enjoying it and am really stoked about the results I'm getting.

That said, here's another thing I can't seem to figure out: the button on state. I've done everything in actionscript, some of it not so clean simply because I'm just not there yet, but everything is so much smoother in terms of execution so I'm trying to stick with it. What happens in this file is that when a button is clicked, the little arrow to the left shows up. But I also want the over state of the button to become the on state (i.e., the lined darker color).

The button code is just spread across three frames in a movieClip with stop and easing scripts. The main timeline code is here:


ActionScript Code:
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

//ANIMATION STUFF
content_mc.visible = false;

var redBoxTweenY:Tween = new Tween(redbox_mc, "y", Strong.easeOut, -110, 0, 20, false);
var bluBoxTweenY:Tween = new Tween(blubox_mc, "y", Strong.easeOut, 526, 106, 20, false);
bluBoxTweenY.addEventListener(TweenEvent.MOTION_FINISH, nextTween);


function nextTween(e:TweenEvent){
    content_mc.visible = true;
    var contentFade:Tween = new Tween(content_mc, "alpha", None.easeNone, 0, 1, 20, false);
    bluBoxTweenY.removeEventListener(TweenEvent.MOTION_FINISH, nextTween);
}


//NAVIGATION
manifesto_mc.buttonMode = true;
manifesto_mc.addEventListener(MouseEvent.ROLL_OVER, navOver);
manifesto_mc.addEventListener(MouseEvent.ROLL_OUT, navOut);
manifesto_mc.addEventListener(MouseEvent.CLICK, contentManifesto);

team_mc.buttonMode = true;
team_mc.addEventListener(MouseEvent.ROLL_OVER, navOver);
team_mc.addEventListener(MouseEvent.ROLL_OUT, navOut);
team_mc.addEventListener(MouseEvent.CLICK, contentTeam);

partners_mc.buttonMode = true;
partners_mc.addEventListener(MouseEvent.ROLL_OVER, navOver);
partners_mc.addEventListener(MouseEvent.ROLL_OUT, navOut);
partners_mc.addEventListener(MouseEvent.CLICK, contentPartners);

tech_mc.buttonMode = true;
tech_mc.addEventListener(MouseEvent.ROLL_OVER, navOver);
tech_mc.addEventListener(MouseEvent.ROLL_OUT, navOut);
tech_mc.addEventListener(MouseEvent.CLICK, contentTech);

accolades_mc.buttonMode = true;
accolades_mc.addEventListener(MouseEvent.ROLL_OVER, navOver);
accolades_mc.addEventListener(MouseEvent.ROLL_OUT, navOut);
accolades_mc.addEventListener(MouseEvent.CLICK, contentAccolades);



function navOver(e:MouseEvent):void {
    e.currentTarget.gotoAndPlay("OVER");
}

function navOut(e:MouseEvent):void {
    e.currentTarget.gotoAndPlay("OUT");
}

function contentManifesto(e:MouseEvent):void {
    var myTween1:Tween = new Tween(content_mc, "x", Strong.easeInOut, content_mc.x, 280, 1, true);
    var myTween2:Tween = new Tween(arrows_mc, "alpha", None.easeNone, 0, 1, 1, true);
    arrows_mc.x = 6;
    arrows_mc.y = 12;
}

function contentTeam(e:MouseEvent):void {
    var myTween1:Tween = new Tween(content_mc, "x", Strong.easeInOut, content_mc.x, -270, 1, true);
    var myTween2:Tween = new Tween(arrows_mc, "alpha", None.easeNone, 0, 1, 1, true);
    arrows_mc.x = 6;
    arrows_mc.y = 30;
}

function contentPartners(e:MouseEvent):void {
    var myTween1:Tween = new Tween(content_mc, "x", Strong.easeInOut, content_mc.x, -820, 1, true);
    var myTween2:Tween = new Tween(arrows_mc, "alpha", None.easeNone, 0, 1, 1, true);
    arrows_mc.x = 6;
    arrows_mc.y = 48;
}

function contentTech(e:MouseEvent):void {
    var myTween1:Tween = new Tween(content_mc, "x", Strong.easeInOut, content_mc.x, -1370, 1, true);
    var myTween2:Tween = new Tween(arrows_mc, "alpha", None.easeNone, 0, 1, 1, true);
    arrows_mc.x = 6;
    arrows_mc.y = 66;
}

function contentAccolades(e:MouseEvent):void {
    var myTween1:Tween = new Tween(content_mc, "x", Strong.easeInOut, content_mc.x, -1920, 1, true);
    var myTween2:Tween = new Tween(arrows_mc, "alpha", None.easeNone, 0, 1, 1, true);
    arrows_mc.x = 6;
    arrows_mc.y = 84;
}

I've also attached the FLA. If anyone has any suggestions or even pointers on a better way to do this, that'd be awesome!

Thanks, guys.

Button Hit State
hey guys, quick question. I have an mc that is over a button on the mainstage. I have the rollover and rollout script that makes the MC play. Im having problems with the script that makes the mc go to the last frame if the user clicks on the button.

I have tried this,
on release { _root.mc1 (gotoAndStop (8);
}

But as soon as I rollout, the mc plays backwards to frame one.
Ive tried also to remove the rollover script in frame 8, but for some reason this didnt work either??
How can I get the MC to stop at frame 8 with an on release script?
Thanks,
Josh

Button Dwn State
Hi,

I am having some trouble with my buttons. THe way my navigation is set up is that the buttons are all placed accross the top and then when clicked the playhead moves to a frame with the content on it.

Currently my code is like

on (press) {
_root.gotoAndPlay(17)
}

I want to add some code so that it still does the same thing but the down state stays down until another one is clicked.

Ive looked through some previous threads but cant seem to get a simple bit of code to do this,

any sugesstions?

HOW DO I KEEP A BUTTON IN DOWN STATE
I have five buttons. I need to program these buttons so that when I click on the button, the information in the down state stays up until another button is pressed. When another button is pressed the information from that down state will stay displayed until I hit another button. PLease help asap!

Button State
I am creating a three page site (Home, About us, Contact Us) . My buttons (which are movieclips with Event listeners) have roll over, roll out, and button down states. All work properly. I am using the SWF as navigation for HTML site. Here is what I want to do.

I want to use the same SWF on all three pages.
This is an example of what I want to do, on the "Home" page I want to click the "About Us" button (which goes to the mouse down state), and I want the "About Us" page to load and the "About Us" button to be displayed in the button down state on this page. I want this functionality for all buttons on every page using only 1 swf file.

I have seen this done in actionscript 2 (in a template I purchased) using only 1 swf file in html and was wondernig if it could be done in actionscript 3. In the html (in the template) I noticed some extra text embedded the swf. It looked like this...

"<param name="movie" value="flash/header_v81.swf?button=2">"

In the .fla file (using actionscript 2) there is a buton (movieclip) with an instance name of "item2". There is also actionscript on another layer on the main time right after all the buttons load that shows this...

"_root["item"+_root.button].gotoAndPlay("s1");
_root.link=_root.button;"

Inside of the movieclip there is actionscript on a layer that says
"p=2"


I am new to this. and I only have experience with actionscript 3 (very little experience at that).

Basically, I need somewhat specific instructions on how to write actionscript 3 and html code to accomplish what this actionscript 2 code does.

I have heard of two ways of doing this (Flashvars and SWF Object). But all the examples are concerning loading text externally from HTML. And I am not sure if this will do what I am trying to do.


I hope I have given enough info.
Any help would be greatly appreciated.





























Edited: 08/24/2008 at 05:17:49 AM by ampped80

Button Over STATE
Hi,

Is there a way to have the over state of a button paused when the user is viewing that section?

For example:
I have four buttons all with over states, if the user is in section "3" is it possible to "freeze" that buttons over state while they are in that section? The only way I know how to do this is by creating four frame labels on the main timeline:

LABELS: 1, 2, 3, 4

Thus when the user is on label 3 of the time line, button 3 is merely the graphic representation of button 3's over state.

There must be a better way??

Cheers,
S ^^

5th Button State
What is the 5th (or more) button state used for?

Button Down State
Hey Folks,

Just wondering if anyone knows how to make a down state for a button.

Basically, I am making a gallery. There's my index page, and then I load my gallery pages into an empty movie clip on the index page.

I want the buttons to stay ina down state when the user clicks on them...

Any suggestions?

Please & Thanks!!

Button State
Ok, this might have been asked before, so if it has, just send me to that thread etc.

If not, my question is this: How do I keep a movieclip button to stay in it's hit state after it has been pressed?

For example - Say I have a button that has white text on it, but when you click it, it turns black. Well when you go to that particular section, or click on that button, how do I keep the text black?

Thanks in advance!

Boon.

How Do I Keep A Button On Its Over State?
i realize this probably a fairly simple question and also that i should have used movieclips for my buttons but i got lazy and used buttons for some of them

is there an easy way to make my button stay "on" after its clicked? i need something fairly easy that i can then go apply to a bunch of buttons. obviously it need it to turn off once another button is clicked as well. hmm...

Set Button State
Hi, i'm making a website with mc used as button for the menu. I want that when i click on
a button he remain on "over" state, then when i click another button it come back to "up" state, and the new one to "over", i can do this, but then i can't assign single action to every button (like onRollOver, gotoAndPlay ecc..). here is my code, please help.
the button istance is pbtn0, pbtn1 and so on to 4.
I'm new to AS, i've found this code on this forum.

thanks so much

code:

fncBtnBuild = function () {
//
// For each of 5...
for (var icrBtn = 0; icrBtn<5; icrBtn++) {
//
// Create a reference to a movieclip-button's
// instance name (pbtn0 through pbtn4).
var rfcClip = this["pbtn"+icrBtn];
//
// Assign the value of the for loop's current
// incrementing variable to a variable (nbrID)
// in the scope of the movieclip-button itself
// (so it can be referred to later in the movieclip-
// button's own event handler functions).
//
// Simultaneously assign the value of the for loop's
// current incrementing variable to a unique variable
// for display by a textField within the movieclip-
// button (there are three of textfields in each
// movieclip-button and it's easier to do it this
// way that to assign the value to three different
// textfield's text property).
rfcClip.nbrID = rfcClip.stgBtnID=icrBtn;
//
// Create the onRelease button event handler function.
rfcClip.onRelease = function() {
//
// Disable this movieclip-button.
this.enabled = false;
//
// Send this movieclip-button to its frame
// showing the disabled state.
this.gotoAndStop("_over");
//
// Create a reference to the last previously clicked
// movieclip-button, based on the stored numeric ID.
var rfcLast = this._parent["pbtn"+this._parent.nbrBtnLast];
//
// Enable the previously clicked movieclip-button.
rfcLast.enabled = true;
//
// Send the previously clicked movieclip-button
// to its normal UP frame.
rfcLast.gotoAndStop("_up");
//
// Assign this movieclip-button's numeric ID to
// the variable in parent timeline to store it as
// the "previously clicked button" value.
this._parent.nbrBtnLast = this.nbrID;

};
}
};
// Run the function.
fncBtnBuild();

Button State
I have 6 blue buttons which when clicked turn to red. I would like the first, home, button to be red when the page loads. When another button is clicked I would like the home button to go to blue, and so on, so the user knows which page he is on. How can I achieve this please?

AS - Tell Button What State To Be In
Hey,
Easy little problem for anyone that has done this before. Got a button with a gotoAndStop. When it gets to that frame I want to have a little bit o' script there to tell it to remain in that buttons over state.

Should be simple, but I never did it with a button. I normally use MCs. Anyone know the syntax for it?

Keep Button Down State
Hi there,
I have another question about this button script: Currently, when a button is in it's down-state, the AS disables the button. But since it needs to be active, i have to find a way to make the current 'down' button remain down during onRollOver and onRollOut.


button.onRollOver = function() {
this.over_holder._alpha = 100;
this.down_holder._alpha = 0;

};
//
button.onRollOut = function() {
this.over_holder._alpha = 0;
this.down_holder._alpha = 0;
};
//
button.onRelease = function() {
if (isSlecetd_btn != null) {
isSlecetd_btn.enabled = true;
isSlecetd_btn.over_holder._alpha = 0;
isSlecetd_btn.down_holder._alpha = 0;
trace("Release Button = "+isSelectd)

}
//Hold Over state.
this.over_holder._alpha = 0;
this.down_holder._alpha = 100;

isSlecetd_btn = this;
isSlecetd_btn.enabled = false;
trace("this = "+this);
};

Button State
Hi, I barely know anything about actionscript and could use help with the following.

I've set up this action at the top of my movie in its own layer that extends for my whole movie. If someone changes the variable buttonpress in the movie to a value of 1 I want the sate of my button named "buttsukh" to change to the over state. I've labled the frame for the over state "_over" in the button frames. Yet, when buttonpress does = 1 the button state does not change. Can you help?

Actionscript...................................... ................................

if (_root.buttonpress==1)
{
_root.buttsukh.gotoandplay("_over");
}
.................................................. .....................................

Thanx for your time.

Button Over STATE
Hi,

Is there a way to have the over state of a button paused when the user is viewing that section?

For example:
I have four buttons all with over states, if the user is in section "3" is it possible to "freeze" that buttons over state while they are in that section? The only way I know how to do this is by creating four frame labels on the main timeline:

LABELS: 1, 2, 3, 4

Thus when the user is on label 3 of the time line, button 3 is merely the graphic representation of button 3's over state.

There must be a better way??

Cheers,
S ^^

5th Button State
What is the 5th (or more) button state used for?

2 State Button
I am trying to create a 2 state button to represent a tick box style button, on and off function. Just like the one in control panels. just the visual representation of the 2 states

How would you do this?

Hit State For Button
I've got a button that I'm trying to apply a hit-state to, but when I draw my rectangle around the button, it (my rectangle) wants to go behind my button image, and not overtop of it.

What am I doing wrong?

Copyright © 2005-08 www.BigResource.com, All rights reserved