Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-14-2004, 10:20 PM   #1
cahill04
Registered Cool Guy
 
Join Date: Oct 2004
Posts: 2
Default How to make a flash button that works like an html button

My problem is action scripting a Movie Clip instance into a button that works much the same way as an html link button. For instance, i want to create four text buttons that are black, and when someone rollsOver one of the buttons it gets highlighted in red. then when someone clicks on the button it stays red until another button is clicked.
This is just the same as a basic html link, and i thought it would be one of the easier parts of my project. It proves to be impossible for me.
If anyone could give me a little advice i would greatly appreciate it.

-cahill
cahill04 is offline   Reply With Quote
Old 10-14-2004, 11:44 PM   #2
cancerinform
Senior Member
 
Join Date: Nov 2003
Posts: 859
Default

Here is a tutorial, which is kind of what you want, not exactly, because once the button was used it stays in the different color but you can figure out the rest.

http://www.flashscript.biz/memoclips...but_color.html
__________________
Website - FLASH XML Applications
cancerinform is offline   Reply With Quote
Old 10-15-2004, 03:22 PM   #3
emilioestevezz
Can i help?
 
emilioestevezz's Avatar
 
Join Date: Nov 2003
Location: Buenos Aires, Argentina. Language: Spanish/english
Posts: 129
Default

Quote:
Originally Posted by cahill04
My problem is action scripting a Movie Clip instance into a button that works much the same way as an html link button. For instance, i want to create four text buttons that are black, and when someone rollsOver one of the buttons it gets highlighted in red. then when someone clicks on the button it stays red until another button is clicked.
This is just the same as a basic html link, and i thought it would be one of the easier parts of my project. It proves to be impossible for me.
If anyone could give me a little advice i would greatly appreciate it.

-cahill
Im needing kinda the same thing, have you find something about it?

Thanks.
Emilio
emilioestevezz is offline   Reply With Quote
Old 10-20-2004, 09:14 PM   #4
zer0ruth
Registered Idiot
 
zer0ruth's Avatar
 
Join Date: May 2003
Location: Brooklyn
Posts: 48
Cool Basic Button Question: Quick Fix

I am not claiming that this is the most effecient way of solving this problem. However since none of the other self proclaimed "flash-experts" came up with an answer (or even a stab at the question) I decided to give the problem a quick fix.

See it work:swf
Download source:fla

There is very little actionScript to this its just a matter of buttons and moving to the selected frame (again i wish i knew how to script this but this is just a quick fix).

Basiclly I have made four buttons each with its own code:
ActionScript Code:
//put this script on first button: on (press) {     gotoAndStop (2); } //put this script on second button: on (press) {     gotoAndStop (3); } //put this script on third button: on (press) {     gotoAndStop (4); } //put this script on fourth button: on (press) {     gotoAndStop (5); }

The button instance itself changes to a different color when you rollOver it. then to solve the problem of staying that color after a button is clicked I have added four frames (one for each button (you can make as many as you want)). When a button is clicked it tells the playhead to go to its own frame where it will turn the link a different color as well as display any content for that link.

NOTE: that the actions above move the play head to one frame past the corosponding link: the first button moves to frame 2, the second button moves to frame 3 and so on. This is because the first frame is reserved for when you start the movie and there are no buttons selected yet.

Hope this helps a little.

-zero
Attached Images
File Type: jpg Untitled-3.jpg (32.5 KB, 241 views)
zer0ruth is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:32 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.