A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: 5005: Unknown error optimizing byte code.

  1. #1
    Member
    Join Date
    Jan 2006
    Posts
    82

    5005: Unknown error optimizing byte code.

    I'm getting this error all of a sudden when I try to compile my flash file.
    "5005: Unknown error optimizing byte code."

    I have tried doing this:
    http://binhdocco.blogspot.com/2010/1...ptimizing.html

    And this:
    http://blog.stefig.net/2009/04/5005-...byte-code.html

    Which seems to work for most people, but I am still getting this error.

    I'm also getting this message in the output window:
    "ReferenceError: Error #1065: Variable ComponentShim is not defined."

    It started happening after I created a new .as file that is about 43kb (holds data for a game level).

    Running Flash CS5 in Mac OSX Snow Leopard. Someone please help.
    Last edited by panthoz; 02-23-2011 at 11:51 PM.

  2. #2
    Member
    Join Date
    Jan 2006
    Posts
    82
    Interestingly enough, the swf compiles just fine if I save as a CS4 file and compile it in Flash CS4... Very strange. Would still like to continue using CS5 if anyone know a way around this.

  3. #3
    Senior Member
    Join Date
    May 2004
    Posts
    226
    Do you have any extremely long lines of code? I am pretty certain there is a character limit the length of a statement.

  4. #4
    Member
    Join Date
    Jan 2006
    Posts
    82
    Quote Originally Posted by v5000 View Post
    Do you have any extremely long lines of code? I am pretty certain there is a character limit the length of a statement.
    Yup I do actually. One very large array that holds level data (tile placement, etc).

    Do you know the limit and is there any way around it?

  5. #5
    Senior Member
    Join Date
    May 2004
    Posts
    226
    No, I don't know the limit. Try dividing your array into several push statements. Is there a requirement for your project that needs the data compiled with the swf? Can you use an external json/xml/text file to store your data?

  6. #6
    Member
    Join Date
    Jan 2006
    Posts
    82
    Quote Originally Posted by v5000 View Post
    No, I don't know the limit. Try dividing your array into several push statements. Is there a requirement for your project that needs the data compiled with the swf? Can you use an external json/xml/text file to store your data?
    Doesn't really make sense though, since it compiles perfectly fine (and quite a bit faster even) in Flash CS4.

  7. #7
    Senior Member
    Join Date
    May 2004
    Posts
    226
    Well, CS4 and CS5 each have their own compilers so can't expect them to behave identically, especially under extreme conditions... I have noticed in general, for large projects where it is noticable, the CS5 compiler is a bit of a slow dog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center