# Simple backgroung rectangle swap

**URL:** <https://forum.kirupa.com/t/simple-backgroung-rectangle-swap/65686>\
**Category:** Uncategorized\
**Created:** [September 28, 2004, 6:59pm UTC](https://forum.kirupa.com/t/simple-backgroung-rectangle-swap/65686 "2004-09-28T18:59:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![defcap](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@defcap](https://forum.kirupa.com/u/defcap)\
**Post date:** [September 28, 2004, 6:59pm UTC](https://forum.kirupa.com/t/simple-backgroung-rectangle-swap/65686/1 "2004-09-28T18:59:16Z")

</div>

im working on flash project thats a mock of an early apple computer (system 1 - 3) and in it i want to create a backgroun chooser. what i have done is created a movie clip to use as my background, and in the movie clip i want to have the options for my background. so, essentially, i have 5 rectangles with tiled backgrounds, and on pressing certain buttons i want one rectangle to appear, and the one that was previously viewable, to disapear. im sure the scripting to get this to happen is relatively easy, im just not sure the best way to do it (do i put each background on a different layer and tell actionscript to make certain layers visible, etc…)

any help would be greatly appreciated.

thanks, ben.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 28, 2004, 7:11pm UTC](https://forum.kirupa.com/t/simple-backgroung-rectangle-swap/65686/2 "2004-09-28T19:11:42Z")

</div>

Probably the easiest way to go about this would be to put each background in a seperate frame, with a stop(); at each frame. Label each frame with it’s color. For example frame 1 is red, so label it “red”.

Then on each color change button put a gotoAndStop(“color”);

Follow me?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 28, 2004, 8:23pm UTC](https://forum.kirupa.com/t/simple-backgroung-rectangle-swap/65686/3 "2004-09-28T20:23:26Z")

</div>

> [@GreenLantern](#):
>
> Probably the easiest way to go about this would be to put each background in a seperate frame, with a stop(); at each frame. Label each frame with it’s color. For example frame 1 is red, so label it “red”.
> 
> Then on each color change button put a gotoAndStop(“color”);
> 
> Follow me?

how do i get a button on the main stage to move to a frame on a different scene (movie clip). in my movie clip called background, i have three frames called bg\_01 bg\_02 and bg\_03, so how do i get it to gotoAndStop(" frame called bg\_02 in movie clip bckgrnd ");

thanks. for your help

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 28, 2004, 8:48pm UTC](https://forum.kirupa.com/t/simple-backgroung-rectangle-swap/65686/4 "2004-09-28T20:48:29Z")

</div>

It would be background.gotoAndStop(“bg\_02”);

Change the name of the frame for each button to go with what you want it to go to.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 28, 2004, 8:53pm UTC](https://forum.kirupa.com/t/simple-backgroung-rectangle-swap/65686/5 "2004-09-28T20:53:21Z")

</div>

Keep in mind this is a quick thrown together example.

I hope it works for you, I didn’t notice this was the MX 2004 forum. I did this in regular old MX.
