MovieClip code

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 :slight_smile:
BTW - I check on ActionScript 2.0 and checked other websites, but they don’t seem to have answers, if you know any links just send :slight_smile:

Thanks :slight_smile:

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


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?

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 :slight_smile: … I just don’t know how to make it change colour!!