Fix Flash Log Problem With Photoshop

It's Big It's Heavy It's Wood!

What rolls down stairs alone or in pairs Rolls over your neighbor's dog? What's great for a snack and fits on your back? It's Log, Log, Log!


Are your trace messages not getting logged from flash?

Are you also using photshop? (who isn’t?)
Well here is the fix to get your flash logging again, and kill that stupid photshop flash log bug.
If you use Adobe CS5, and also develop flash apps, you may have noticed that you cannot debug swf files when photoshop is running. And if you happen to use photoshop a lot, its simply not an option to have to close and open it every time you test a swf.

In fact its pretty lousy that you cant debug flash with photshop open. Boo Adobe for compiling a swf tool that works in photoshop, but exporting it for debug, and not for release. If you hapen to work at adobe and are reading this, here is a hint. Select “for release” when you compile your swf.

Anyway, here’s the fix. You just have to delete a few files. from a plugin extension that nobody ever uses anyway.

This solution was found in the help files of this project on google code:

Vizzy Flash Tracer

Here are the files to delete:

Scripting extension in Photoshop is also blocking flash log file. It’s located here: C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Plug-ins\Extensions. You should delete these files or just backup them to other folder:

ScriptingSupport.8li
ScriptUIFlexPhotoshop.swf
ScriptUIFlexServer.swf
ScriptUIFlexServer-app.xml

Posted in Tutorials | Leave a comment

10 Billion Android Downloads and Counting

Google is celebrating 10 billion app downloads from android market this week with a pretty amazing promotion: they are selling 10 different premium apps for 10 cents each. There are 10 new apps each day. I apready picekd up two today, including Minecraft portable, usually $6.99!

Check it out yourself.

Posted in News | Tagged | Leave a comment

Android: Clearing The Android Activity Stack

Activty Flow

Click to Enlarge

I was building my first real android app for a client and had a situation in which I did not want the back button to take you back to the immediate last step. The app starts with the user entering information, a list of names in this case, and then clicking start. Once you click start, it would be impossible for the app to go back and make changes, so I wanted to make sure that clicking back after that just took you to the splash page. But the default android behavior is to go back to the last activity used.

It was tricky to figure out how to get this to do what I wanted. There are a lot of very smart ways to manage the Activity Stack and Tasks. But it turns out, no way to clear all the items in the history list except for the first. To make it happen you have to override the onBackPressed() method of the activty you are launching. That way intead of going back to the last Activity in the history stack, that screen creates an Intent to go back to the home screen.

The code to do that is really simple. The activity stack is not cleared, but by calling this, you essentially achieve the same thing. The history contains a loop now. And the intervening screens can no longer be reached by the back button.

	@Override
	public void onBackPressed() {
		// TODO Auto-generated method stub
		//super.onBackPressed();
		startActivity(new Intent(this, HomeScreenActivity.class));
	}
Posted in Code Snippets, Tutorials | Tagged , , , , , | Leave a comment

Worst Episode Ever…

Did you attend Adobe Max 2011 this year? Well, let’s hope not. It was without a doubt the worst conference I ever attended. Maybe there was some great stuff if you were a photoshop user. But if you’re a flash developer there was one clear message from Adobe: Capitulation.

In the big kerfluffle between Adobe and Apple, it would appear that Adobe has hoisted the white flag, and wants us to all just move on to HTML5.
And I’m not the only one who was surprised to see Adobe have nothing to offer to flash developers but excuses and broken promises.
One of my favorite flash bloggers, John Lindquist also noticed that all was not well in the house of Adobe.
Were you at MAX? Tell me what you thought in the comments.

Posted in News, Opinion | 1 Comment

Making A Like-Gate For A Facebook Fan Page

Want to know how to make a fan page tab that shows one thing to users who like the page, and something different to those who do not? This is called a “like gate” and is pretty easy to implement using PHP on the server side to do the hard part. Be sure to download a copy of the facebook PHP SDK. The file is required by the script below.

*Update* Source is now avaiable from github.

First, create a new facebook app. You will need the appID and App Secret to customize the code below.

Then make a fan page. Add you app to the fan page. You can do this by navigating the the application description page and clicking “Add to my page”. A list of pages owned by you will show up. Click the page you want to add the app to.

Now the app is in a tab. Copy that url. You’ll need that too. That will be your $loginNextPage – the page the user will be directed to after clicking like – which we want to be our tab again.

Finally, use the code below to detect whether the user likes the fan page or not.

<?php
 
require 'facebook.php';
 
$app_id = "YOUR APP ID";
$app_secret = "YOUR APP SECRET";
 
$loginNextPage = 'PATH TO YOUR FAN PAGE ON FACEBOOK'.'?sk=app_'.$app_id;
 
$facebook = new Facebook(array(
        'appId' => $app_id,
        'secret' => $app_secret,
        'cookie' => true
));
 
$signed_request = $facebook->getSignedRequest();
 
$like_status = $signed_request["page"]["liked"];
 
 
if ($like_status) {
	// FOR FANS
	$session = $facebook->getSession();
    $loginUrl = $facebook->getLoginUrl(
            array(
            'canvas'    => 1,
            'fbconnect' => 0,
			'next' => $loginNextPage
            /*'req_perms' => 'publish_stream,photo_upload,user_photos,user_photo_video_tags'			*/
            )
    );
 
    $fbme = null;
 
	if (!$session) {
		echo "<script type='text/javascript'>top.location.href = '$loginUrl';</script>";	
        exit;	
	}
	else {
 
		try {
            $access_token = $facebook->getAccessToken();
			$vars = "access_token=$access_token&pathToServer=$pathToServer&appName=$appName";
        } catch (FacebookApiException $e) {
            echo "<script type='text/javascript'>top.location.href = '$loginUrl';</script>";
            exit;
        }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">	
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
</head>
 <body>
 <h1>You Liked The Page</h1>
</body>
</html>
<?php
	}	
}
else {
	// FOR NON FANS	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">	
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
  </head>
  <body>
  <h1>You Don't Like the Page</h1>
	</body>
</html>
<?php
 
}
 
?>
Posted in Tutorials | 11 Comments