# 5005: Unknown error optimizing byte code. Nothing works!

**URL:** <https://forum.kirupa.com/t/5005-unknown-error-optimizing-byte-code-nothing-works/319542>\
**Category:** flash\
**Created:** [February 24, 2011, 5:27am UTC](https://forum.kirupa.com/t/5005-unknown-error-optimizing-byte-code-nothing-works/319542 "2011-02-24T05:27:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![likwid](https://avatars.discourse-cdn.com/v4/letter/l/e480ec/32.png) [@likwid](https://forum.kirupa.com/u/likwid)\
**Post date:** [February 24, 2011, 5:27am UTC](https://forum.kirupa.com/t/5005-unknown-error-optimizing-byte-code-nothing-works/319542/1 "2011-02-24T05:27:54Z")

</div>

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](http://binhdocco.blogspot.com/2010/12/flash-cs5-5005-unknown-error-optimizing.html)

And this:  
[http://blog.stefig.net/2009/04/5005-…byte-code.html](http://blog.stefig.net/2009/04/5005-unknown-error-optimizing-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.
