Thursday, 20 September 2012

Button's With Code

Well, today I made some bog standard button's that change colours and number's when you click on them. It was fairly easy when I got to grips with what code I had to put in. You learn something new every day. Anyway heres the code i used:
 
 
 
 
Writen form:
 
stop();
firstBtn.onPress = function()
{
 gotoAndStop(1);
}
secondBtn.onPress = function()
{
 gotoAndStop(2);
}
thridBtn.onPress = function()
{
 gotoAndStop(3);
}
fourthBtn.onPress = function()
{
 gotoAndStop(4);
}
 

No comments:

Post a Comment