PDA

View Full Version : Pill button


alsvik
06-01-2003, 10:26 PM
How do i change the actions on "over" and "down" on the "Pill Button" from the component library in Flash MX ?

They don't have the normal layout of a button, so editing the button, doesn't show these four normal frames to edit.

Can anyone help me?

Code from the button:
_________________________________________
this.onPress = function() {
pressing = true;
for (i=1; i<=3; i++) {
buttonColor = new Color(eval("piece"+i).colorchip);
buttonColor.setRGB(0x333333);
lowColor = new Color(eval("piece"+i).bottomhilite);
lowColorTransform = new Object();
lowColorTransform = {ra:'0', rb:'200', ga:'0', gb:'200', ba:'0', bb:'200', aa:'100', ab:'0'};
lowColor.setTransform(lowColorTransform);
}
};
this.onRelease = function() {
pressing = false;
};
this.onReleaseOutside = function() {
pressing = false;
};
this.onEnterFrame = function() {
if (pressing!=true) {
for (i=1; i<=3; i++) {
buttonColor = new Color(eval("piece"+i).colorchip);
buttonColor.setRGB(rgb);
lowColor = new Color(eval("piece"+i).bottomhilite);
lowColorTransform = new Object();
lowColorTransform = {ra:'0', rb:hc1, ga:'0', gb:hc2, ba:'0', bb:hc3, aa:'100', ab:'0'};
lowColor.setTransform(lowColorTransform);
}
}
};
with (piece2) {
_width = _parent.wide;
piece1._x = _x-_width/2;
piece3._x = _x+_width/2;
_parent.midshadow._width = _width;
_parent.leftshadow._x = _x-_width/2;
_parent.rightshadow._x = _x+_width/2;
}
label1.autoSize = "center"
label2.autoSize = "center"

farafiro
06-04-2003, 05:40 AM
what is that Pill Button??

spriggan
06-05-2003, 06:20 AM
it's a componet button in the common Library. And alsvik what do you want to change?

farafiro
06-05-2003, 06:31 AM
ahhhhhhhhh, open the library
there is a folder called component button assets inside another folder Butten Assets
do what ever u want here

But it's better to make one your self