Flash exporting error with OSX

Hi, when i try to export my game to Flash everything goes right but in the end it drops the next message:

Error building Player: Exception: Compiling SWF Failed:
Loading configuration file /Applications/Unity/Unity.app/Contents/PlaybackEngines/FlashSupport/BuildTools/flex/frameworks/flex-config.xml

./Temp/StagingArea/Data/ConvertedDotNetCode/global/Init.as(28): col: 24 Error: Call to a possibly undefined method RuntimeServices_op_Equality_CLIArray_CLIArray through a reference with static type Class.

			if (RuntimeServices.RuntimeServices_op_Equality_CLIArray_CLIArray(this.Init$yArray$, null)) {
			                    ^

is this having a weird behaviour?

To fix this error i have edited /Temp/StagingArea/Data/ConvertedDotNetCode/global/Init.as(28) commenting the if sentences:

public function Init_Start(): void {
                        var $num: int = 10;
                        var $num2: int = 12;
                        //if (RuntimeServices.RuntimeServices_op_Equality_CLIArray_CLIArray(this.Init$yArray$, null)) {
                                this.Init$yArray$ = new _Array().Array_Constructor_Int32($num2).Array_ToBuiltin_Type(_Array.$Type) as CLIArray;
                        //}

and launch with java:

java -Xmx512m -Dsun.io.useCanonCaches=false -Duser.region=US -Duser.language=en -jar '/Applications/Unity/Unity.app/Contents/PlaybackEngines/FlashSupport/BuildTools/flex/lib/mxmlc.jar' +flexlib='/Applications/Unity/Unity.app/Contents/PlaybackEngines/FlashSupport/BuildTools/flex/frameworks' '/Applications/Unity/Unity.app/Contents/PlaybackEngines/FlashSupport/BuildTools/UserBuild_AS3/UnityApp.as' -debug=false -optimize=true -include-libraries='/Applications/Unity/Unity.app/Contents/PlaybackEngines/FlashSupport/UnityPlayerNative.swc'  -source-path='./Temp/StagingArea/Data/src' -source-path='./Temp/StagingArea/Data/ConvertedDotNetCode' -source-path='/Applications/Unity/Unity.app/Contents/PlaybackEngines/FlashSupport/BuildTools/UserBuild_AS3' -static-link-runtime-shared-libraries=true -swf-version=13 -default-size 700 550 -omit-trace-statements=false -default-script-limits=1000,60 -target-player=11.0.0 -verbose-stacktraces=true -compress=false -output='Temp/StagingArea/Data/temp.swf'
Loading configuration file /Applications/Unity/Unity.app/Contents/PlaybackEngines/FlashSupport/BuildTools/flex/frameworks/flex-config.xml
Warning: Default CSS file not found.

./Temp/StagingArea/Data/temp.swf (13137201 bytes)

but when i load the swf in the browser appears the message:
“Fatal error”: http://imageshack.us/photo/my-images/829/errorswfunity.gif

is this a new bug? :shock:

I am following the instructions from this page:
http://unifycommunity.com/wiki/index.php?title=Which_Kind_Of_Array_Or_Collection_Should_I_Use%3F
to build an array, while you Unity guys fix these Flash exportation bugs, we, indie developers whose are needed for a quick fix to this issue, with just replace the “new Array” code with ArrayList() stuff ,it does the magic :wink:

In stead of :

static var yArray     : GameObject[,];
//...
yArray = new GameObject[gridY,gridX];
//...
yArray[j,i] = GameObject.Instantiate( rock, pos ,Quaternion.identity);

use this method:

//declare
static var yArray: ArrayList;
//instanciate:
yArray = new ArrayList();
//declare bidimensional part of the array:
for (var j = 0; j < gridY; j++) 
    {
        var xArray : ArrayList;
        xArray = new ArrayList();
        for (var i=0;i<gridX;i++) 
        {
          xArray.Add(  GameObject.Instantiate( rock, pos ,Quaternion.identity) ) ;
        }
       yArray.Add( xArray );
   }
//..

then, to iterate the arraylist and make it compatible with flash exportation (it is AS), you can do this:

for (var j = 0; j < yArray.Count; j++) 
    {
		var l: ArrayList = yArray.Item[j];
        for (var i=0;i<l.Count;i++) 
        {                    
        	var o:GameObject = l.Item[i];
        	o.transform.Rotate(0.0,0.6,0.0);
        }

    }

I hope Unity coders have a better solution for this…

Bumping.