RE: [Flashcoders] Prevent flash from caching the loaded assets
Just saw this solutions. This is what I need. No caching on the client. We try to implement this solution in our project. I'll let you know if works also with PHP. -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Muzak Verzonden: donderdag 9 augustus 2007 4:37 Aan: flashcoders@chattyfig.figleaf.com Onderwerp: Re: [Flashcoders] Prevent flash from caching the loaded assets With AS3 you can load the image as binary data (Base64 encoded). import flash.events.*; import flash.net.*; import flash.display.Loader; import flash.utils.ByteArray; import com.dynamicflash.util.Base64; var url:String = http://www.muzakdeezign.com/flashcoders/binary_image/image.cfm; var imgLoader:Loader; var imgReq:URLRequest; var imgURLLoader:URLLoader; function imgLoaderCompleteHandler(evt:Event):void { trace(Application ::: imgLoaderCompleteHandler); var imgData:ByteArray = Base64.decodeToByteArray(evt.currentTarget.data); imgLoader = new Loader(); imgLoader.loadBytes(imgData); addChild(imgLoader); } imgReq = new URLRequest(url); imgURLLoader = new URLLoader(); imgURLLoader.addEventListener(Event.COMPLETE, imgLoaderCompleteHandler); imgURLLoader.load(imgReq); // see it in action http://www.muzakdeezign.com/flashcoders/binary_image/load_binary.html The Coldfusion file contains the following: cfsetting enablecfoutputonly=yes showdebugoutput=no cfcontent type=application/x-shockwave-flash / cfset imgPath = ExpandPath(leaves.jpg) / cffile action=readBinary file=#imgPath# variable=imgBinary / cfset img64 = toBase64(imgBinary) / cfoutput#img64#/cfoutput Note that I added a cfcontent tag that changes the content type to Flash, so when viewing the cfm page directly in your browser, it will *try* to display an swf (and fail) ;-) http://www.muzakdeezign.com/flashcoders/binary_image/image.cfm I used a Binary64 class to convert the loaded binary data to ByteArray. http://www.dynamicflash.com/goodies/base64 regards, Muzak - Original Message - From: Steven Sacks [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, August 09, 2007 1:56 AM Subject: Re: [Flashcoders] Prevent flash from caching the loaded assets A solution is to convert the image into a textfile which is then used to draw the image on the screen using bitmap drawing tools. This, of course, is easily hacked by anybody with a copy of Flash because they can read your textfile and draw the bitmap themselves. The next step is to encrypt that textfile. Problem is, you have to put your decryption code inside of Flash, which is, of course, easily hacked by anybody with a free copy of SoThink. You cannot make secure games in Flash unless all logic is on the server and Flash becomes a dumb interface. This isn't going to be possible with your game because you're using a mask to reveal an image. You're also trying to control the browser and the OS file system from inside a plug-in running in that browser. Give up on that idea. Basically, you're trying to secure an open file format (swf). You cannot do this. Any swf files you put on any public server can be downloaded and decompiled by anyone. Flash source code is never safe. If you don't like that Flash isn't secure and is an open-format, then I suggest you write a letter to Adobe, ATTN: Circular File. In other words, forget it. Flash is not secure because it is open and that's how it is. If you want to do something like this, you will have to use a lower-level technology, but I'm doubtful a Java plug-in will support what you're trying to do, either. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Prevent flash from caching the loaded assets
We are making a game in which people have to quess what's on a photo while viewing it through a little moveable hole. The images will be loaded from the server. The problem is caching. To cheat is easy... watch the cached files. Is there a way to prevent flash from caching the loaded assets or does anyone has an other solution? Thanks, Niels ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Prevent flash from caching the loaded assets
It seems to me that the swf is easy to decompile and the photo also... We were working on sending an array with amfphp which contains the pixel information and use BitmapData setPixel to plot the image. But it seems that AMFPHP isn't able to send such a large array (800x600pix). Has anyone done somthing like this before? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens eric e. dolecki Verzonden: maandag 6 augustus 2007 20:51 Aan: flashcoders@chattyfig.figleaf.com Onderwerp: Re: [Flashcoders] Prevent flash from caching the loaded assets http://foo.domain.com/images/imageContainer.swf?e=; + getDate() all images could be in 1 swf and called out. On 8/6/07, Ian Thomas [EMAIL PROTECTED] wrote: That's a wonderfully neat idea. :-D Ian On 8/6/07, Jack Doyle [EMAIL PROTECTED] wrote: If you're able to store the images in SWF format instead of something like JPG, you could set up your SWFs so that they're covered with a black rectangle MovieClip by default and then you flip the _visible property to false in your application when you load them in. That way, if people try to look at the SWF from the browser's cache, they'll just see a big black rectangle but within your app, the photo is visible. Just a thought. Jack ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Prevent flash from caching the loaded assets
AS2 for the moment... -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Ian Thomas Verzonden: maandag 6 augustus 2007 21:38 Aan: flashcoders@chattyfig.figleaf.com Onderwerp: Re: [Flashcoders] Prevent flash from caching the loaded assets Niels, Is this AS2 or AS3? Ian On 8/6/07, Niels Endlich [EMAIL PROTECTED] wrote: It seems to me that the swf is easy to decompile and the photo also... We were working on sending an array with amfphp which contains the pixel information and use BitmapData setPixel to plot the image. But it seems that AMFPHP isn't able to send such a large array (800x600pix). Has anyone done somthing like this before? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens eric e. dolecki Verzonden: maandag 6 augustus 2007 20:51 Aan: flashcoders@chattyfig.figleaf.com Onderwerp: Re: [Flashcoders] Prevent flash from caching the loaded assets http://foo.domain.com/images/imageContainer.swf?e=; + getDate() all images could be in 1 swf and called out. On 8/6/07, Ian Thomas [EMAIL PROTECTED] wrote: That's a wonderfully neat idea. :-D Ian On 8/6/07, Jack Doyle [EMAIL PROTECTED] wrote: If you're able to store the images in SWF format instead of something like JPG, you could set up your SWFs so that they're covered with a black rectangle MovieClip by default and then you flip the _visible property to false in your application when you load them in. That way, if people try to look at the SWF from the browser's cache, they'll just see a big black rectangle but within your app, the photo is visible. Just a thought. Jack ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com