Debug Flash in Internet Explorer when developing on a Mac

Problem: Need to debug Flash in Internet Explorer when developing on a Mac
Solution: Use the Javascript console via ExternalInterface.call(“console.log”“your message”);
Notes: Doesn’t work with IE 6

Comments

Internet Explorer “null” is null or not an object error when trying to use Actionscript’s ExternalInterface

Problem: IE throws “null” is null or not an object error when trying to use Actionscript’s ExternalInterface
Solution: Add the id attribute with any value to the <object> tag

Comments

Traverse an XML tree that contains nodes with dashes in them in PHP using SimpleXMLElement

Problem: Need to traverse an XML tree that contains nodes with dashes in them in PHP using SimpleXMLElement
Solution: Enclose the node name with dashes in it with {”}
Example: $person is a SimpleXMLElement node:  $name = $person->{‘three-current-positions’}->position->company->name;

Comments

Get an iPhone’s UID without connecting to iTunes

Problem: Need to get an iPhone’s UID without connecting to iTunes
Solution: Download the Enterprise configuration tool from Apple: http://support.apple.com/kb/DL851

Comments

Hyphens in XML brought into Actionscript cause compile time errors

Problem: hyphens in XML brought into actionscript cause compile time errors
Solution: use XMLList.child(“node-name”) in place of normal e4x syntax

Comments

Decode a URL encoded string in Actionscript

Problem: Need to decode a URL encoded string in Actionscript
Solution: Use the native AS function unescape with a grep pattern to substitute spaces for +
Example: decoded_string = unescape(encoded_string).replace(/\+/g, ” “);

Comments

Hyphens in Actionscript XML

Problem: Hyphens in XML brought into Actionscript cause compile time errors

Solution: Use XMLList.child(“node-name”) in place of normal e4x syntax

Comments

Decoding a URL encoded string in Actionscript

Problem: You need to decode a URL encoded string in Actionscript

Solution: Use the native AS function unescape with a grep pattern to substitute spaces for +

Example: decoded_string = unescape(encoded_string).replace(/\+/g, ” “);

Comments

How to target different versions of IE in a single CSS file

Problem: You want to target specific CSS rules at different versions of IE, but don’t want to use separate files (conditional CSS).

Solution: Use the following CSS hacks:

Use \9 for IE 8 and below

Use * for IE 7 and 6

Use _ for IE 6 only

Example:
_background-color: #f00; /* will show in IE 6 only */

*background-color: #f00; /* will show in IE 6 and 7 only */

background-color: #f00\9; /* will show in IE 6,7 and 8 */

Comments

Show errors even though they are turned off in php.ini

Problem: You aren’t seeing php errors because the server config has them turned off in php.ini

Solution: Add the following lines of code to the php file on which you want to see errors.

ini_set(‘display_errors’,1);
error_reporting(-1);

See http://us.php.net/manual/en/function.error-reporting.php for more info about supressing different error types

Comments