Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE FLASH: Adobe Flash ForumAdobe Flash TutorialsAdobe Flash Video TutorialsWeb Streaming ForumAdobe Flash

Buttons

Cow Forums : Adobe Flash
Buttons
by Neema Sadeghi on Jul 19, 2008 at 6:02:45 am

I'm fairly new to Flash, but I can manage in creating what I want to make, for the most part. I have one question, and I'm hoping someone can help me with a solution. Maybe it's an action script. Here is the scenario:

I have a home page with a bunch of buttons. The buttons are all rollover buttons, and they are strictly shapes. Now I have the button that goes to the page that I would like it to go to, and back to the original page. Is there a way, or a recommended way for me to have the button that I created stay in it's rolled-over form, so the viewer knows that he has clicked on this button before?

I would really appreciate the help.




Respond to this post   •   Return to posts index

Re: Buttons
by Pieter Helsen on Jul 19, 2008 at 10:44:39 am

You need to do this using actionscript and movieclips. The movieclips, in essence, become buttons.

Create your movieclips like you would, a button. Use the movieclips timeline to create the effects and later use actionscript to go to the frame where the effect begins. Like so:


// I have a movieclip named myBtn_mc and inside this MC are
// four frame labels: normal, rollOver, rollOut and click.
// Using gotoAndPlay, I navigate to these labels.
myBtn_mc.onRollOver = function(){
this.gotoAndPlay("rollOver");
}

myBtn_mc.onRollOut = function(){
this.gotoAndPlay("rollOut");
}

myBtn_mc.onRelease = function(){
this.gotoAndPlay("click");
trace("clicked!");


This is only half of it though. Once you click, the button should be disabled until another button is clicked.

I added a file where you can see how this is done. Download it here.

Kind regards,
Pieter

Respond to this post   •   Return to posts index

Re: Buttons
by Neema Sadeghi on Jul 19, 2008 at 2:15:49 pm

Thank you. I couldn't manage to download the file however. For some reason it says it doesn't exist.!



Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINEDVDsBOOKSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]