# Possible Easy Question :)

**URL:** <https://forum.kirupa.com/t/possible-easy-question/224861>\
**Category:** programming\
**Created:** [May 6, 2007, 12:23pm UTC](https://forum.kirupa.com/t/possible-easy-question/224861 "2007-05-06T12:23:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AngelX](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@AngelX](https://forum.kirupa.com/u/AngelX)\
**Post date:** [May 6, 2007, 12:23pm UTC](https://forum.kirupa.com/t/possible-easy-question/224861/1 "2007-05-06T12:23:31Z")

</div>

Hi All,

Here’s my thought and I’m going to use basic buttons to display my concept.

Ok, scene 1 2 buttons, 1 red 1 green.

Each button links to the same frame, say 30.  
Each button sets a different response to the same global var.

Ie

On the red button

on (release) {  
\_global.butColour = “red”;  
gotoAndPlay(30);  
}

On the greenbutton

on (release) {  
\_global.butColour =“green”;  
gotoAndPlay(30);  
}

Ok, so far so easy. Now on frame 30 I want to have the global var produce the selected global object on the stage.

eg

if (\_global.butColour ==“red”) {  
insert red button on center of stage  
}  
if (\_global.butColour ==“green”) {  
insert green button on center of stage  
}

So what’s the missing code? _( insert green button on center of stage)_

Any help would be greatly appreciated.

Thanks.
