# MovieClip code

**URL:** <https://forum.kirupa.com/t/movieclip-code/118341>\
**Category:** Uncategorized\
**Created:** [August 4, 2004, 4:38pm UTC](https://forum.kirupa.com/t/movieclip-code/118341 "2004-08-04T16:38:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sim085](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sim085](https://forum.kirupa.com/u/Sim085)\
**Post date:** [August 4, 2004, 4:38pm UTC](https://forum.kirupa.com/t/movieclip-code/118341/1 "2004-08-04T16:38:59Z")

</div>

Hi to all … again … I know that i’m starting to get on your nerves with all my questions on Action Script but I still have some unresolved problems!!

I am developing this class in which I have created a Movie Clip that I want to use as a button. Now it works fine as a button, However I want that the button changes the background colour when ever the user goes with the mouse on it! The following code is once again the code I used to create the Movie Clip.

[font=Courier New]parent.createEmptyMovieClip(“Button1”, 1);[/font]  
[font=Courier New]with(parent.Button1){[/font]  
[font=Courier New]beginFill(0xCC0000, 100);[/font]  
[font=Courier New]moveTo(0,0);[/font]  
[font=Courier New]lineTo(200,0);[/font]  
[font=Courier New]lineTo(200,100);[/font]  
[font=Courier New]lineTo(0,100);[/font]  
[font=Courier New]lineTo(0,0);[/font]  
[font=Courier New]endFill();[/font]  
[font=Courier New]}[/font]

[font=Courier New]// Handling a Click on button[/font]  
[font=Courier New]Button1.onRelease = function(){[/font]  
[font=Courier New]…[/font]  
[font=Courier New]}[/font]

I tought of tying to create a new frame in the MovieClip and put the new items in the new movie. However i don’t know how! coz it seems that it is overiding!

I hope that some one has the answer for this one 🙂  
BTW - I check [kirupa.com](http://kirupa.com) on ActionScript 2.0 and checked other websites, but they don’t seem to have answers, if you know any links just send 🙂

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Sim085](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sim085](https://forum.kirupa.com/u/Sim085)\
**Post date:** [August 4, 2004, 10:51pm UTC](https://forum.kirupa.com/t/movieclip-code/118341/2 "2004-08-04T22:51:23Z")

</div>

Sh\*t … I have done my best butstill can understand how to emulate these button Over/Hit/etc …

☹

---

<div class="post-metadata">

**Author:** ![njdboy](https://avatars.discourse-cdn.com/v4/letter/n/b19c9b/32.png) [@njdboy](https://forum.kirupa.com/u/njdboy)\
**Post date:** [August 5, 2004, 7:53am UTC](https://forum.kirupa.com/t/movieclip-code/118341/3 "2004-08-05T07:53:51Z")

</div>

do you have to do actionscript? why not just make the over state have the different color background you want? or do you mean have the whole stage background color change?

---

<div class="post-metadata">

**Author:** ![Sim085](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sim085](https://forum.kirupa.com/u/Sim085)\
**Post date:** [August 5, 2004, 3:50pm UTC](https://forum.kirupa.com/t/movieclip-code/118341/4 "2004-08-05T15:50:15Z")

</div>

Becaue I am developing classes that create new objects. What I did is created a window that I can then use for any other situation a like. I have the close button which I would like to make it a button with colour changes onMouseOver … btw the button already closes the window 🙂 … I just don’t know how to make it change colour!!
