PDA

View Full Version : Button help!



demon510
September 4th, 2007, 10:15 AM
I have a lot of button symbols (468) and I am trying to get the following functionality out of them.

1. mouseover and a number (1 - 468) increases from 7px to 12px.
2. onPress the number stays at 12px.
3. onPress again and the number goes back to 7px.
4. when the user hits the "Shift" key all numbers go back to 7px.

Before my customer didnt want all of this functionality so I created all 468 as buttons and I really do not want to change them all to movie clips if I dont have to. Any help would be greatly appreciated.

Thanks!!

demon510
September 4th, 2007, 10:28 AM
I forgot to mention, I am a newbie when it comes to flash.

Skarab
September 4th, 2007, 10:55 AM
I don't think you can get that degree of functionality out of a button. A button only has three states, up, mouseover, and down. To include all that functionality you would have to at the very least create movie clips to place within one or more of those three states, which is way more work.

demon510
September 4th, 2007, 11:07 AM
I don't think you can get that degree of functionality out of a button. A button only has three states, up, mouseover, and down. To include all that functionality you would have to at the very least create movie clips to place within one or more of those three states, which is way more work.

Thanks, I was hoping that this wasnt the case but looks like I was wrong.

I tried another method just to test it out but doesnt work for me.

I created a movie with an instance name of 1, then created another movie with and instance name of 1m, this 1m was placed within movie 1. I then inserted this code written by someone else but cant get it to work.



for(i=1;i<469;i++){
this["btn"+i].onRollOver=function(){
this.gotoAndPlay("1m");
}
this["btn"+i].onPress=function(){
this.gotoAndStop("1mm");
}
}