Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by chillypacman · Feb 11, 2012 at 05:45 AM · compilerflash

Unity3D flash compiler errors when compiling from C#

My project runs fine when I compile for iPhone, Android, Windows and OSX builds but for Flash I get the following errors and warnings:

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Interpolation.as(115): col: 24 Error: Call to a possibly undefined method Round through a reference with static type Class.

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Interpolation.as(15): col: 27 Error: Type was not found or was not a compile-time constant: Random.

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Interpolation.as(15): col: 40 Error: Call to a possibly undefined method Random.

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Interpolation.as(15): col: 40 Error: Call to a possibly undefined method Random.

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Interpolation.as(5): col: 15 Error: Definition System:Random could not be found.

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\ContrastStretchEffect.as(98): col: 120 Warning: Migration issue: * is not a dynamic class. Instances cannot have members added to them dynamically.

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\ScoreInst.as(18): col: 32 Error: Type was not found or was not a compile-time constant: Stopwatch. public var ScoreInst$timer$: Stopwatch = new Stopwatch().Stopwatch_Constructor();

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\ScoreInst.as(18): col: 48 Error: Call to a possibly undefined method Stopwatch.

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\ScoreInst.as(3): col: 27 Error: Definition System.Diagnostics:Stopwatch could not be found.

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Meteormaker.as(3): col: 15 Error: Definition System:Random could not be found.

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\UpgradeBar.as(55): col: 129 Warning: Migration issue: * is not a dynamic class. Instances cannot have members added to them dynamically.

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\PlayerAvatar.as(58): col: 30 Error: Call to a possibly undefined method PlayerAvatar_Constructor through a reference with static type global:PlayerAvatar.

Error building Player: Exception: Compiling SWF Failed: Loading configuration file C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\flashsupport\BuildTools\flex\frameworks\flex-config.xml

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Interpolation.as(115): col: 24 Error: Call to a possibly undefined method Round through a reference with static type Class.

          $num =

Number(_Math.Round(Number($num), 0)); ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Interpolation.as(15): col: 27 Error: Type was not found or was not a compile-time constant: Random.

      public static var rand: Random = new

Random().Random_Constructor(); ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Interpolation.as(15): col: 40 Error: Call to a possibly undefined method Random.

      public static var rand: Random = new

Random().Random_Constructor(); ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Interpolation.as(15): col: 40 Error: Call to a possibly undefined method Random.

      public static var rand: Random = new

Random().Random_Constructor(); ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Interpolation.as(5): col: 15 Error: Definition System:Random could not be found.

  import System.Random;
               ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\ContrastStretchEffect.as(98): col: 120 Warning: Migration issue: * is not a dynamic class. Instances cannot have members added to them dynamically.

                  (this.ContrastStretchEffect$adaptRenderTex$.elements[$i]

as RenderTexture).Object_hideFlags_HideFlags = HideFlags.HideAndDontSave; ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\ScoreInst.as(18): col: 32 Error: Type was not found or was not a compile-time constant: Stopwatch.

      public var ScoreInst$timer$:

Stopwatch = new Stopwatch().Stopwatch_Constructor(); ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\ScoreInst.as(18): col: 48 Error: Call to a possibly undefined method Stopwatch.

      public var ScoreInst$timer$:

Stopwatch = new Stopwatch().Stopwatch_Constructor(); ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\ScoreInst.as(18): col: 48 Error: Call to a possibly undefined method Stopwatch.

      public var ScoreInst$timer$:

Stopwatch = new Stopwatch().Stopwatch_Constructor(); ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\ScoreInst.as(3): col: 27 Error: Definition System.Diagnostics:Stopwatch could not be found.

  import System.Diagnostics.Stopwatch;
                           ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Meteormaker.as(26): col: 35 Error: Type was not found or was not a compile-time constant: Random.

      public var Meteormaker$m_rand$:

Random = new Random().Random_Constructor_Int32(452); ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Meteormaker.as(26): col: 48 Error: Call to a possibly undefined method Random.

      public var Meteormaker$m_rand$:

Random = new Random().Random_Constructor_Int32(452); ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Meteormaker.as(26): col: 48 Error: Call to a possibly undefined method Random.

      public var Meteormaker$m_rand$:

Random = new Random().Random_Constructor_Int32(452); ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\Meteormaker.as(3): col: 15 Error: Definition System:Random could not be found.

  import System.Random;
               ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\UpgradeBar.as(55): col: 129 Warning: Migration issue: * is not a dynamic class. Instances cannot have members added to them dynamically.

          ($transform.Component_gameObject.GameObject_GetComponent$1$1(MeshRenderer.$Type)

as MeshRenderer).Renderer_enabled_Boolean = true; ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\UpgradeBar.as(56): col: 130 Warning: Migration issue: * is not a dynamic class. Instances cannot have members added to them dynamically.

          ($transform2.Component_gameObject.GameObject_GetComponent$1$1(MeshRenderer.$Type)

as MeshRenderer).Renderer_enabled_Boolean = true; ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\UpgradeBar.as(86): col: 129 Warning: Migration issue: * is not a dynamic class. Instances cannot have members added to them dynamically.

          ($transform.Component_gameObject.GameObject_GetComponent$1$1(MeshRenderer.$Type)

as MeshRenderer).Renderer_enabled_Boolean = false; ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\UpgradeBar.as(87): col: 130 Warning: Migration issue: * is not a dynamic class. Instances cannot have members added to them dynamically.

          ($transform2.Component_gameObject.GameObject_GetComponent$1$1(MeshRenderer.$Type)

as MeshRenderer).Renderer_enabled_Boolean = false; ^

E:\meteormania\Temp\StagingArea\Data\ConvertedDotNetCode\global\PlayerAvatar.as(58): col: 30 Error: Call to a possibly undefined method PlayerAvatar_Constructor through a reference with static type global:PlayerAvatar.

          return new

PlayerAvatar().PlayerAvatar_Constructor();

                                   ^


Among a few other errors and warnings. Any ideas why and how to fix?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Studio Five27 · Feb 11, 2012 at 12:27 PM

You have a lot going on there, so I don't have a simple answer for you. I can tell you that every place I used "static" ended up being a problem when I tried to export to Flash. I'd suggest you refactor your static strategy and see where that gets you. It would also seem that the "Random" class is simply not supported (based on your errors, not on my specific knowledge). I generally use XOR-SHIFT or MT19937 or other algorithms, so I don't know firsthand.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Studio Five27 · Feb 11, 2012 at 12:27 PM

You have a lot going on there, so I don't have a simple answer for you. I can tell you that every place I used "static" ended up being a problem when I tried to export to Flash. I'd suggest you refactor your static strategy and see where that gets you. It would also seem that the "Random" class is simply not supported (based on your errors, not on my specific knowledge). I generally use XOR-SHIFT or MT19937 or other algorithms, so I don't know firsthand.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Cannot Get Light To Flash - Help 1 Answer

Unity3d Flash find object issue 1 Answer

"Access of undefined property Environment" when exporting to Flash 1 Answer

Flash: The file 'MemoryStream' is corrupted! when Instantiate CharacterMotor 0 Answers

Actionscript example does not work. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges