This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > January 2004 > Functions and buttons???





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Functions and buttons???
dunnster webforumsuser@macromedia.com

2004-01-27, 1:31 pm

Hi All

Does anybody know if there is a way of adding functions to a button by clicking another button.

I have tried this bit of code, which was just a wild stab at it.

on(release){
btn1_btn.onRelease = function(){
movieclipa.gotoAndPlay(2);
}
}

Would appreciate any suggestions.

Many Thanks


stwingy webforumsuser@macromedia.com

2004-01-27, 6:34 pm

I think this is what you are trying to
unless btn1 is pressed first, btn2 does nothing
myVar = 1;
btn1.onPress = function() {
myvar = 0;
};
btn2.onPress = function() {
if (!myVar) {
trace("hello");
//Do some things;
}
};

Certified but not by Macromedia!
myurl
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews