Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package
- {
- /**
- * ...
- * @author Daniel Williams
- * ** Interplanetary Studios **
- * ** PLAYER PROTOTYPING **
- *
- */
- import flash.display.MovieClip;
- import flash.events.MouseEvent;
- import flash.events.TimerEvent;
- import flash.events.Event;
- import flash.media.Sound;
- import flash.media.SoundMixer;
- import flash.media.SoundChannel;
- import flash.utils.Timer;
- import flash.ui.Keyboard;
- import flash.events.KeyboardEvent;
- import flash.events.*;
- import Player;
- public class Main extends MovieClip
- {
- var myPlayer:Player; //Declare here vs in a private function to access it throughout the class.
- public function Main()
- {
- addEventListener(Event.ADDED_TO_STAGE, init);
- stage.focus = myPlayer;
- }
- private function init(e:Event):void
- {
- myPlayer = new Player();
- this.addChild(myPlayer);
- stage.focus = myPlayer;
- }
- }
- }
Add Comment
Please, Sign In to add comment