all groups > flash (alternate) > february 2005 >
You're in the

flash (alternate)

group:

Changing Background color in swf


Changing Background color in swf z
1/31/2005 4:17:36 PM
flash (alternate):
Any help will be apriciated.

How to make choose color background in movie.

I would like to make a option for visitors to choose background color of a
movie among 4 different colors

Thanx in advance


I hope you all remember how is to be a newbie :))

Re: Changing Background color in swf joan
2/7/2005 11:57:50 AM
still a newbie :)

but this seems to work:

first, create a rectangle on the stage, convert it to a movie clip (F8), =
and name the instance on the stage myBG
second, make a movie clip with a text box named buttonTxt, drag four =
instances of the movie clip onto the stage and name them button0, =
button1, button2 and button3 (e.g.)
third, enter the following script in the actions panel

changeBGcolor =3D function () {
myColor =3D new Color("myBG");
myColor.setRGB(this.thisColor);
updateAfterEvent();
};
this.button0.thisColor =3D 0x0000FF;
this.button1.thisColor =3D 0x00FF00;
this.button2.thisColor =3D 0xFF0000;
this.button3.thisColor =3D 0xFFFF00;
this.button0.onRelease =3D changeBGcolor;
this.button1.onRelease =3D changeBGcolor;
this.button2.onRelease =3D changeBGcolor;
this.button3.onRelease =3D changeBGcolor;
this.button0.buttonTxt.text =3D "button0";
this.button1.buttonTxt.text =3D "button1";
this.button2.buttonTxt.text =3D "button2";
this.button3.buttonTxt.text =3D "button3";



[quoted text, click to view]
AddThis Social Bookmark Button
View Other Months
January 2005
February 2005