PDA

View Full Version : Action Script Button problem


liquid646
04-15-2007, 10:27 PM
I'm a graphic designer and I'm working on my portfolio.. I don't know much about action scripting and i have a problem with my button layout.
Three section on the page (website, flash, flyers)
My problem:
I need to deactivate each of the other buttons when I press one of them inside the movie clip. (ex. i press the website button and need to DEACTIVATE the flash and flyers button in the website clip (will have a back button to get back to the 'root') so someone can NOT click the other buttons unless you go back.
I made the page so each part has a separate 'movie'
I am new to action scripting, can someone pleease help me with this. :confused:

nadafinga
04-18-2007, 07:52 PM
yourButton.onRelease = function() {
null();
}


hope this helps, hard to say without seeing your code...

liquid646
04-19-2007, 08:01 AM
Code.. I'm not really writing any code.. just making buttons and using "on press goto and play frame ...) Stop." I have a one Scene in which 3 movie clips reside in (the three sections to the site) Isn't there an action script / code that i can place somewhere inside each of the movie clips to Deactivate the two other buttons? (by button name). Or is there a simpler way to do it (without the scripting knowledge)
I have NO scripting/code expertise... =(
please help..

nadafinga
04-19-2007, 03:16 PM
well if you have "on press goto and play frame ...) Stop." on your button, then on the particular frame that you don't want the button to be activated, change the code from:


"on press goto and play frame ...) Stop."
to
"on Press gotoAndPlay Null...) Stop."

another example:


button01.onPress = function() {
gotoAndPlay(1);
}
//change too
button01.onPress = function() {
null();
}


hope that helps, if not, maybe if you post your .fla i could help more, its kind of hard to understand what you are trying to explain...

liquid646
04-19-2007, 11:46 PM
Thanks for your attention to this but it still is not working. Each button is in a DIFFERENT movie clip (so i can't put the code on the specific frame, cause its back in another movie clip) and all three movie clips (each with its own animations and button) are in the Main Scene 1.
Ex. One scene, 3 movie clips each clip has its own button. Lets say i press button 1 (which is inside the movie clip 1) I need to 'turn off' buttons 2 and 3 (which are INSIDE movie clip 2 and 3); and if i go and press button 2, buttons 1 and 3 need to 'turn off' (deactivate), and so on.\
I really appreciate the help and hope you get what I'm trying to do.
If anything I can put up the flash somewhere and you can see what I'm mean. thanks.
Dimitri

nadafinga
04-20-2007, 04:00 PM
its hard to just explain it to me, so if you can post your work, it would help.... otherwise,

try putting your actionscript on a frame instead of the clip, that way you have more control over when a button is active and when it is not.

nadafinga
04-20-2007, 06:55 PM
chceck out this quick example that I mocked up, its what I think you are trying to do, but with two buttons.....

liquid646
04-21-2007, 02:15 AM
wow thanks alot for that great mock up. It worked GREAT! had to do a lil rearranging in my setup but at the end it worked!
I'm very thankfull for your help, you helped me a million thank you again.. =)
D