Exemple #1
0
 internal MovieClip(RootMovieClip root, Sprite sprite, DisplayObject container)
     : base(root, container)
 {
     _sprite = sprite;
     IsPlaying = true;
     DontLoop = false;
 }
Exemple #2
0
        internal Button(RootMovieClip root, ButtonInfo info, DisplayObject container)
            : base(root, container)
        {
            _button = info;

            CurrentState = State.Over;
            SetButtonState(State.Up);
            LoadActions();
        }
Exemple #3
0
        private Flash(Game game, IServiceProvider services, FlashDocument document, int surfaceWidth, int surfaceHeight)
            : base(null)
        {
            if (document == null) throw new ArgumentNullException("document");
            if (services == null) throw new ArgumentNullException("services");

            ISystemServices system = (ISystemServices)services.GetService(typeof(ISystemServices));
            if (system == null) throw new InvalidOperationException("Flash can be used only with ISystemServices registered!");

            _surface = system.VectorDevice.CreateSurface(surfaceWidth, surfaceHeight, SurfaceFormat.Color);
            Root = new RootMovieClip(document, system);
            SurfaceSize = new Vector2(surfaceWidth, surfaceHeight);
            SizeInTwips = new Vector2(document.Width, document.Height);
        }
Exemple #4
0
        public GlobalScope(RootMovieClip root)
        {
            _root = root;

            // Auto native methods
            foreach (var fun in NativeActionFunc.CreateFunctions(GetType().Assembly))
                this[fun.Key] = fun.Value;
            foreach (var fun in NativeActionFunc.CreateFunctions(Assembly.GetExecutingAssembly()))
                this[fun.Key] = fun.Value;

            // Manual native methods
            // Classes
            // Variables
            this["_root"] = root;
            this["_global"] = this;
        }
Exemple #5
0
        internal StageObject(RootMovieClip root, DisplayObject container)
        {
            _container = container;

            Root = root;
            Parent = null;
            Visible = true;
            Context = new ActionContext
            {
                Constants = null,
                DefaultTarget = this,
                Registers = new ActionVar[4],
                RootClip = Root,
                Scope = new LinkedList<ActionObject>(),
                Stack = new Stack<ActionVar>(),
                This = this
            };
            if (Root != null) Context.Scope.AddFirst(Root.GlobalScope);
            Context.Scope.AddLast(this);
        }
Exemple #6
0
 public Movie.IDrawable MakeInstance(Movie.DisplayObject container, RootMovieClip root)
 {
     return new Button(root, this, container);
 }
Exemple #7
0
 public Movie.IDrawable MakeInstance(Movie.DisplayObject container, RootMovieClip root)
 {
     return null;
 }
Exemple #8
0
 Movie.IDrawable ICharacter.MakeInstance(DisplayObject container, RootMovieClip root)
 {
     return new Movie.MovieClip(root, this, container);
 }