This is a discussion on "Setting the state of a button using actionscript" within the Flash & Multimedia Forum section. This forum, and the thread "Setting the state of a button using actionscript are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Setting the state of a button using actionscript
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Setting the state of a button using actionscript
I would like to set the state of a button to its down state onrelease.
I have tried the following: on (release) {this. gotoAndPlay("down"); } I even tried putting a frame label of down on the down frame in the button but that doesn't work either. There must be a way to do this with actionscript but how? |
|
|
|
||||
|
I will make one suggestion, if this does not work, I need to see a sample fla file. Here is my only suggestion.
|
|
|||
|
Re: Setting the state of a button using actionscript
Hmm. Ok. I got a syntax error until I took out one bracket. Now I have this
I have been told it is not possible unless I convert the button to a movie clip but then the actionscripting gets quite complicated. |
|
||||
|
Re: Setting the state of a button using actionscript
OK I needed the flash fla file to better trouble shoot your problem, it is easier if you can look at a sample file and fix it then just look at the code. As for your problem. I have never heard of doing this with a button in action script 1, or 2. But I think this is possible in the new version of action script 3.0. Here is a link. Sorry I could not help you any further.
http://livedocs.macromedia.com/flex/...html#downState |
|
|||
|
Re: Setting the state of a button using actionscript
Hi,
Did you ever find a solution for this? I have a related sort of a problem. I just want my buttons to appear in their "over" or "down" state (it doesn't really matter which) when they have been pressed. For example, I want the "portfolio" page button to appear in it's "down" state when the portfolio page is displayed. I have tried to do this by setting variables, but without any luck. Any suggestions? Cat.. |
|
|||
|
Re: Setting the state of a button using actionscript
No I didn't find a solution to it other than making the button into a movie clip and then having to script the whole roll over functionality first.
|
![]() |
| Tags |
| flash, button states, button, onrelease function |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Movieclip button active state problem !! Help Please !! | alladeen | Flash & Multimedia Forum | 6 | Oct 25th, 2007 14:40 |
| How to retain the disable state of the button after page refreshing | srinivasyadav | JavaScript Forum | 1 | Sep 9th, 2007 14:17 |
| Radio Button Problems in ActionScript 3.0 | dgstarr | Flash & Multimedia Forum | 1 | Sep 6th, 2007 17:11 |
| Button triggering movie state | WakeoftheBunT | Flash & Multimedia Forum | 3 | Nov 6th, 2006 13:15 |