Skip to main content
Participant
February 1, 2012
Answered

Select character and START

  • February 1, 2012
  • 1 reply
  • 554 views

Hi, I have a character selection screen and I'd like the player to highlight the selected character by pressing on it and then press a START button. How?

Of course he can change his mind and select another character before pressing start.

Translated to commands should be something like:

  • Press button1 (Character 1) and leave it highlighted
  • Press button2 (Character 2), leave it highlighted and shut down button1 highlight
  • Press button3 (START), go to LEVEL1 with movieclip on Frame1 (Character1) if button1 is highlighted, go to LEVEL1 with movieclip on Frame2 (Character2) if button2 is highlighted

Maybe I could hide every highlight on release except of the selected character by writing on each button: highlight1._visible=false, etc...

But then I really don't have a clue for the third step. Help me please gods of Flash!

This topic has been closed for replies.
Correct answer kglad

create a variable, eg chosenCharacter and when a character is clicked assign chosenCharacter=yourclickevent.currentTarget

1 reply

kglad
Community Expert
Community Expert
February 1, 2012

create a highlight movieclip and assign its _visible property to false.  when a character is clicked, assign the highlight's _x,_y to match the character and assign its _visible property to true.

odhinn3Author
Participant
February 3, 2012

That's correct and good solution for the first 2 steps, thanks...

... but what about the START button? There's only one button for all the characters... So how could I redirect to the LEVEL1 with the chosen character?

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
February 3, 2012

create a variable, eg chosenCharacter and when a character is clicked assign chosenCharacter=yourclickevent.currentTarget