Adobe Melrose – The Place To Sell Your Apps

This post is about Adobe Melrose – the new Lab project from Adobe, and my first contact with it. I hope to be able to continuously update this article so you can get perfect view of what is going on when you decide to use Melrose. Lets begin with public static const MELROSE: :-)

Melrose (codename) enables developers and publishers to distribute and make money with Adobe® AIR® applications through application stores. Melrose provides a repository that distributes applications to multiple application stores so that publishers can reach millions of users. Intel AppUp Center and the Adobe AIR Marketplace are the first two storefronts available in Melrose. Melrose also provides analytics that let publishers measure success of their applications.

Read the rest of this entry »

Quick Tip: What is MY_UNIQUE_32_HEX_NUM?

When working with Adobe Merlose licensing code I hit MY_UNIQUE_32_HEX_NUM variable containing some generated string (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX). As there was nothing within my emails from melrose that would correspond to that string, investigation got started. Soon after I found Merlose FAQ saying that MY_UNIQUE_32_HEX_NUM is a GUID that you choose and is immutable for the lifetime of the application, followed by Q&A combo:

Q: Do I need to randomly generate the application UID that is passed to the* checkLicense() *call or will Adobe give one to me?
A: You need to generate the UID. We recommend you use a GUID generator tool like: http://www.guidgenerator.com/online-guid-generator.aspx. Generate your own unique number and plug it into your code…

Mistery solved!

Authorizing Facebook Applications in AIR

I was asked to make AIR compatibile version of FacebookOAuthGraph class. It was a nice little challenge for me, where I learn some new things about AIR. E.g. how easy it is to define the JavaScript callback directly from ActionScipt (HTMLLoader.window.methodName)… There are more ways to make authorization process work for you, I have chosen the one with popup window. In order to make FacebookOAuthGraph work for AIR, the short extending is required, instead of creating popup window from JavaScript, popup is created by HTMLLoader.createRootWindow (no ExternalInterface required)…

Read the rest of this entry »

Quick Tip: Simpliest dictionary

Here is a short extract from a very simple dictionary engine I use on few of my latest projects. Even though it is based on single static method replace() :-) , I always search and copy-paste the file from project to project, so I decided to publish it, maybe it can help someone else too …

package
{
    public class Dict
    {
        public static const LINK_IN_CLIPBOARD:String =
            "%1\nLink has been copied into the clipboard."

        public static const UPDATE_FLASH_PLAYER:String =
            "Please update your flashplayer.";

        public static const HELLO:String = "%1 %2";

        public static function replace(text:String, ... rest):String
        {
            var i:uint = 1;
            for each(var repl:String in rest)
                text = text.replace("%" + i++, repl);
            return text;
        }
    }
}

Usage:

trace(Dict.UPDATE_FLASH_PLAYER);
trace(Dict.replace(Dict.LINK_IN_CLIPBOARD, "http://somelink"));
trace(Dict.replace(Dict.HELLO, "Hello", "World"));

Have a nice one.

Security.loadPolicyFile() Ignored … Not at all! (update)

I was about to publish an article about a bug in flash player, that loadPolicyFile() method fails when loading crossdomain policy files from a custom location (not domain root), but I soon realized that it is not a bug, but a feature :-) .

It seems like flash player (WIN 10,1,50,426, debug) ignores crossdomain files loaded from a custom location. The documentation defines Security.loadPolicyFile() as a method to be used to download “cross-domain policy file from a location specified by the url parameter”, it does not work at all. Even the custom crossdomain.xml is requested (debuged with proxy software), the flash application somehow ignores it and tries to load crossdomain.xml file from a domain root. And if there is none on the domain root (why would it be, when you need to load custom one) all your loads results in security error.

After some investigation, I found out, that it is required to have a domain root crossdomain file that allows handling with cross-domain files located besides domain root via site-control element. Long story short, cross-domain security is an alchemy and one should read the whole specification. Long story even shorter, if you have no access to domain root (and there is no required crossdomain file with allow-access-from or site-control), you are doomed (flash application will not let you handle file contents from the location) … please read the update part (not doomed at all)! Lets have a quick look at scenario with the site-control on domain root and allow-access-from on custom location:

Read the rest of this entry »

3D Displacement Maps

Good news everyone, since 3D displacement maps gained big success, I was asked to make a standalone application, so anyone could use it within their webpages. After few hours of hard work, the 3 applications are finally out and you can see and download it from 3ddm.yoz.sk. Feel free to use it on your own webpages. If you do so, please notice the copyright, and/or consider a small donation via PayPal (donation button in footer). If you are willing to see the source code of these application, you can download it from here: App3DDMSimple.as, App3DDMFade.as, App3DDMAnaglyph.as, App3DDMSimplePV.as, App3DDMFadePV.as, App3DDMSimpleAW.as, App3DDMSimpleTriangles.as, additional classes, .pbk and .pbj files can be downloaded from classes.yoz.sk. Any feedback welcome :-)

Read the rest of this entry »

Get Adobe Flash playerPlugin by wpburn.com wordpress themes