コード例 #1
0
        private void GenerateFlexSystemManagerFrame()
        {
            if (IsSwc)
            {
                return;
            }
            if (!IsFlexApplication)
            {
                return;
            }

            var managerFullName = FlexSystemManager.BuildFrame();

            Debug.Assert(FrameWithFlexSystemManager != null);
            Swf.FrameCount++;

            Swf.SetFrameLabel("System Manager");

            var symTable = new SwfTagSymbolClass();

            AddAbcTag(FrameWithFlexSystemManager);
            Assets.ImportLateAssets();
            Assets.FlushAssets(symTable);

            symTable.AddSymbol(0, managerFullName);
            Swf.Tags.Add(symTable);
            Swf.ShowFrame();
        }
コード例 #2
0
        void GenerateApplicationFrame()
        {
            Swf.FrameCount++;

            var g = new AbcGenerator {
                SwfCompiler = this
            };
            var abc = g.Generate(AppAssembly);

            if (IsSwc)
            {
                var symTable = new SwfTagSymbolClass();

                CreateScripts(abc, symTable);

                if (symTable.Symbols.Count > 0)
                {
                    Swf.Tags.Add(symTable);
                }
            }
            else
            {
                var rootName = IsFlexApplication ? _flexAppType.FullName : g.RootSprite.Instance.FullName;

                //label should be the same as root name
                Swf.SetFrameLabel(rootName);

                if (g.IsNUnit)
                {
                    GenerateHtmlWrapper = false;
                }

                var symTable = new SwfTagSymbolClass();
                //see http://bugs.adobe.com/jira/browse/ASC-3235
                AddAbcTag(abc);
                Assets.ImportLateAssets();
                Assets.FlushAssets(symTable);

                //NOTE: In MX application root sprite is autogenerated subclass of mx.managers.SystemManager.
                if (!IsFlexApplication)
                {
                    //define symbol for root sprite
                    symTable.AddSymbol(0, rootName);
                }

                if (symTable.Symbols.Count > 0)
                {
                    Swf.Tags.Add(symTable);
                }
            }

            Swf.ShowFrame();
        }