Cannot Resolve a Multiname Reference Unambiguously JSON In Flash Builder 4.6 with SmartFox Server

Posted by & filed under ADOBE FLEX.

Adobe has introduced native JSON support in Flash Player 11 as well in the subsequent versions of the Flash player, this error mainly happens because package name collision in the as3corelib (action Script  core library) with JSON class in the flash player. where Cannot Resolve a Multiname Reference Unambiguously JSON clearly says the error due to two or more classes with same name.

I am using Flash builder 4.6 with Flash player 11 for the development. When I try connect SmartFox server using Action Script 3 in Flash Builder 4.6 it shows following the error.

access of undefined property JSON in smartfoxclient.as flash builder 4.6 with flash player 11
I am sugesting simple solution to avoid the above error, Find the SmartFoxClient.as file in your installed directory (it/gotoandplay/smartfoxserver/SmartFoxClient.as).

Now look for the following two lines code

1. JSON.encode(obj)

2. JSON.decode(msg)

where JSON class referred with unqualified names that leads JSON class name collision. To avoid this error refer the above JSON class with their fully qualified name, so change the above lines like one shown in the below manner.

com.adobe.serialization.json.JSON.encode(obj)

com.adobe.serialization.json.JSON.encode(obj)

 

 .

Download Premium Only Scripts & 80+ Demo scripts Instantly at just 1.95 USD per month + 10% discount to all Exclusive Scripts

If you want any of my script need to be customized according to your business requirement,

Please feel free to contact me [at] muni2explore[at]gmail.com

Note: But it will be charged based on your customization requirement

Get Updates, Scripts & Other Useful Resources to your Email

Join 10,000+ Happy Subscribers on feedburner. Click to Subscribe (We don't send spam)
Every Email Subsciber could have access to download 100+ demo scripts & all future scripts.

Get Instant Script Download Access!