click and stay

  • Galvitron
  • Newbie
  • Newbie
  • Galvitron
  • Posts: 5

Post 3+ Months Ago

ok i create a button
lets just say its a rectangle
fill blue line red
i edit the button
put a keyframe in the "over"
in that keyframe i change the colours of the rect
so now when the mouse is over the button it changes to the colours
cool? cool.

ok the process is somewhat the same for the down frame

omg what is this guy getting too?

what im looking for is when the rectangle is clicked the colours stay different
kind of like you highlighted the button

i thought of putting a movieclip on the down frame and then putting a stop in there but it didnt work

anyways i hope someone can help me thanks
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • barrax
  • Newbie
  • Newbie
  • barrax
  • Posts: 12
  • Loc: Southampton, UK

Post 3+ Months Ago

I personally prefer to use movieclips instead of buttons and then code the over/down states for them. This way you have more control over their behaviours.

To make the button stay when clicked:
1.create a movieclip with 3 frames.
2.make your graphics for your up/over/down states (on frames 1,2,3)
3.add a layer called "actions" and add the following code the frame 1.

Code: [ Select ]
stop();
this.onRollover = function() {
    gotoAndStop(2);
};
this.onRollOut = this.onDragOut=function () {
    if (this.selected != true) {
        gotoAndStop(1);
        this.selected = false;
    }
};
this.onPress = function() {
    gotoAndStop(3);
    this.selected = true;
};
  1. stop();
  2. this.onRollover = function() {
  3.     gotoAndStop(2);
  4. };
  5. this.onRollOut = this.onDragOut=function () {
  6.     if (this.selected != true) {
  7.         gotoAndStop(1);
  8.         this.selected = false;
  9.     }
  10. };
  11. this.onPress = function() {
  12.     gotoAndStop(3);
  13.     this.selected = true;
  14. };


good luck :)

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 14 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.