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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

julianopolitoCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
willsherwoodAuthor Commented:
thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.