[osflash] fyi : Flash / JavaScript integration kit beta

Michael Hansen borendex at gmail.com
Wed Jun 8 00:54:50 PDT 2005


Hi,

Thanx for the kit Mike. Already a time saver :o)

Found some minor things that needs correcting for MTASC support though
(don't know if -strict will give more compile errors).

Please review the changes; I have only made 'quick fixes' without
acquiring any deeper understanding of the inner workings of the code
(however it seems to work fine with the corrections below).

Cheers

   -michael



-------- JavaScriptProxy.as ---------

* Replace:

	public function __resolve(functionName:String):Function
	{		
		var f:Function = function()
		{
			arguments.splice(0,0, functionName);
			var f:Function = call;
			f.apply(this, arguments);		
		};
		
		return f;
	}


* With:

	public function __resolve(functionName:String):Function
	{		
		var f:Function = function()
		{
			arguments.splice(0,0, functionName);
			var f:Function = this.call;   //change!!
			f.apply(this, arguments);		
		};
		
		return f;
	}


-------- JavaScriptSerializer.as ---------


* Replace:

	/* Deserializes a Boolean Value */
	public static function deserializeBoolean(s:String):String
	{
		return Boolean(s);
	} 	


* With:

	/* Deserializes a Boolean Value */
	public static function deserializeBoolean(s:String):Boolean //change!!
	{
		return Boolean(s);
	}


//////////////////////////////////////////


//mtasc has a more strict scope rule so

* Replace:

	for(var x:Number = 0; x < len; x++)
	{
		arr.push(parseNode(children[x], o));
	}
	

* With:

	for(var childNo:Number = 0; childNo < len; childNo++)
	{
		arr.push(parseNode(children[childNo], o));
	}




On 6/6/05, Mike Chambers <mchamber at macromedia.com> wrote:
> http://www.macromedia.com/go/flashjavascript/
> 
> mike chambers
> 
> mesh at macromedia.com
> 
> 
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>



More information about the osflash mailing list