Flash script: text string parameter decoding syntax inside flash

I have a situation where i want to pass to a flash script a text string from a PHP call.
The parameter is an absolute URL of an image (out of a DB library of client products).
I do not want to divulge the location of the image, in order to make it as obfuscated as possible for a casual user not to be able to easily SAVE-AS the jpg file.  (I realize that Print-Screen can capture images, but that's beside the point...)

If i give Flash an MD5 (or otherwise) encoded parameter, what is the call/syntax within flash to DECODE the string given the KEY (which would be hardcoded, or we could put in a file somewhere as a config variable)



thanks

<script type="text/javascript">
 
   var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
 
   so.addVariable("param1", "xyzzy");   // where xyzzy has been MD5-encoded
 
   so.write("flashcontent");
 
</script>

Open in new window

willsherwoodAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
julianopolitoConnect With a Mentor Commented:
Well MD5 is a hash creation method. It is not meant to be decoded. You can use some variation of it, that should let you use a key to encode/decode. There is no built in method for that in flash. You can use a library that contains these functions. If you just need to obfuscate for the casual user, you should try base64 encode/decode. You can fid it in here: http://dynamicflash.com/goodies/base64/ . This is pretty ok, since you can even encode multiple times. For the casual user it is not look friendly for sure. Also you can use other obfuscating methods of your own. Also you can use the corelib from adobe which has the com.adobe.crypto.MD5 class and other cryptographic classes, you can find it here: http://code.google.com/p/as3corelib/
0
 
willsherwoodAuthor Commented:
thanks!
0
All Courses

From novice to tech pro — start learning today.