OK, I have a problem changing the frame. (I would say that this step-by-step) was originally made from JPEG -> Movie Clip (Record), and I manually created the button in this movie clip. Then by Edchil (Record) in Mainclass, I added it on stage. Now I have made a functional button with modifications on the class records, and now by clicking on it I want to go to PrevFrame.
Public Class Main Class MovieClip {var x: boolean = false; Static Var Ramka 3: Movie Clip; Public Function Mainclass () {stop (); This.addEventListener (Event.ENTER_FRAME, RRR); } Function rrr (): zero {if (x == false) {x = true; RAM 3 = new record (); RAM 3.x = Stage. Stagewidth / 20; Ram3.y = Stage. Stage High / 4; Ram3.width = stage.stageWidth / 1.1; RAM 3 Heights = stage. Stage high / 2; AddChild (record); }}
Record category:
expansion of public class record movie clip {public function record () {Restart.addEventListener (MouseEvent.CLICK, RestartGame) ; MainMenu.addEventListener (MouseEvent.CLICK, RestartGame); } RestartGame function (Event: MouseEvent): Zero {var button: DisplayObject = DisplayObject (event.currentTarget); If (button == restart) {Goto Andspot (2); // is nothing} if (button == main menu) {}}
No comments:
Post a Comment