Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-09-2006, 09:28 PM   #1
nitzicuile
Registered User
 
Join Date: Feb 2006
Posts: 21
Exclamation Flash 8 - XML - Cache

Hi!

I am developing an application with Flash and XML. This application retrieve all the information from the XML.

My problem is that, these XML has information that I don't want people know... and it starts when the swf and xml files are cached by the browser/flash player

* - I am using Flash 8,
* - XML is not encrypted (Is this a good solution?),
* - ActionScript 2.0,

How about another solution?

Please, let me know if there is any information you need to help me...

Thx lot,

nitz
nitzicuile is offline   Reply With Quote
Old 02-09-2006, 10:15 PM   #2
simonboris
HK510
 
simonboris's Avatar
 
Join Date: Nov 2001
Location: Montreal
Posts: 290
Default

hi nitzicuile,

when you load your xml file using xml build in method, load an asp or php file
that generated xml content. That way your xml wont be cached by the browser.

The only downside of this is that you cannot preload it. You have to wait for the onload method of the xml class.
__________________
www.hk510.com
simonboris is offline   Reply With Quote
Old 02-10-2006, 12:36 PM   #3
nitzicuile
Registered User
 
Join Date: Feb 2006
Posts: 21
Default

Hey! thanks...

I have to ask my boss if that is the kind of solution he wants...
He was talking about encrypting information between <tabs></tabs> ...

Anyway, anything else?...
nitzicuile is offline   Reply With Quote
Old 02-10-2006, 04:06 PM   #4
simonboris
HK510
 
simonboris's Avatar
 
Join Date: Nov 2001
Location: Montreal
Posts: 290
Default

I am not sure about encryption.

Sure you can encrypt your data, but to read or use, you will have to decrypt it. You will need your de-encrytion function or method in your flash. If someone decompile your flash, he will be able to get decryption methods... If he gets your xml file, he will gain access to your data.

If you use server generated xml, no one will have access to the xml data, ontly to the decryption process.

The problem with this is the amount of data to be decrypted. Imagine, you have to decrypt the info before using it...

And don't forget that there is a size limit for xml file to be loaded in flash.
It's about 70ko. Beyon that, you will see flash player run slower... I don't know if the limit have changed with flash 8, but you should read flash specs using xml. Maybe with encryption, your file size will be larger than the limit.

And if this data you want to encrypt is so sensitive, maybe you should'nt use it in your flash...

And how much time will you take to create encryption/decryption process that can be reusable... will it worth the money and time spent ?

Hope it help,
__________________
www.hk510.com

Last edited by simonboris; 02-10-2006 at 04:09 PM.
simonboris is offline   Reply With Quote
Old 02-10-2006, 04:11 PM   #5
Skindc
skin the world
 
Join Date: Oct 2005
Location: cyberspace
Posts: 16
Send a message via MSN to Skindc Send a message via Skype™ to Skindc
Smile use random number

If the problem is that you want flash to ensure to reload the xml document rather than using a cached version just add add a random number to end of url string and will reload the xml everytime!

Code:
var ranNum:Number=Math.ceil(1000*(Math.random()*(1000*Math.random())));
docXml.load('xmldoc.xml?'+ranNum);
Skindc is offline   Reply With Quote
Old 02-10-2006, 04:13 PM   #6
sleekdigital
I like pizza!
 
Join Date: Feb 2003
Location: PA
Posts: 1,310
Send a message via AIM to sleekdigital Send a message via MSN to sleekdigital Send a message via Yahoo to sleekdigital
Default

I don't know what gave you that idea, but generating the XML dynamiaclly with PHP or any other server side technology does not prevent the browser from caching the XML.

The only good solution I can think of for your case is flash remoting.
sleekdigital is offline   Reply With Quote
Old 02-10-2006, 04:26 PM   #7
Skindc
skin the world
 
Join Date: Oct 2005
Location: cyberspace
Posts: 16
Send a message via MSN to Skindc Send a message via Skype™ to Skindc
Default

sleek, if your referring to my last comment about using the random number this is to be done in flash, it is a quick resolve to prevent the flash file using a cached version of xml and is not a replacement for remoting, this was not my intention but this can come in handy for smaller projects that need only to import a small xml docs but ensures refreshing of xml document. I have used it in many scenarios for cms for flash content in many cases.
Skindc is offline   Reply With Quote
Old 02-10-2006, 04:29 PM   #8
sleekdigital
I like pizza!
 
Join Date: Feb 2003
Location: PA
Posts: 1,310
Send a message via AIM to sleekdigital Send a message via MSN to sleekdigital Send a message via Yahoo to sleekdigital
Default

Skindc, no i am refering to simonboris' comment ...

Quote:
Originally Posted by simonboris
hi nitzicuile,

when you load your xml file using xml build in method, load an asp or php file
that generated xml content. That way your xml wont be cached by the browser.

The only downside of this is that you cannot preload it. You have to wait for the onload method of the xml class.
Sorry that i was not clear about that.

Yes I am aware of your method and I use it myself, but the original poster said he did not want people to be able to see his data.
sleekdigital is offline   Reply With Quote
Old 02-10-2006, 06:50 PM   #9
nitzicuile
Registered User
 
Join Date: Feb 2006
Posts: 21
Default

Uhmm a friend talks to me about "flash remoting"... I am going to read about it...

Maybe is the solution...

About ...

Quote:
If the problem is that you want flash to ensure to reload the xml document rather than using a cached version just add add a random number to end of url string and will reload the xml everytime!
... I do not want to reload XML, I do not want my XML to be cached on clients machine... thanks anyway! learning never ends...
nitzicuile is offline   Reply With Quote
Old 02-11-2006, 12:45 AM   #10
simonboris
HK510
 
simonboris's Avatar
 
Join Date: Nov 2001
Location: Montreal
Posts: 290
Default

hi sleekdigital,

when i say server side generated xml, i mean:

PHP Code:
var f:XML = new XML();
f.ignoreWhite true;
f.onLoad = function(b:Boolean)
{
  if(
b)
  {
    
// code...
  
}
}
f.load("myFile.php"); // or asp or jsp
// in the server page, i render an xml opbject with header.
// so at the end, i get an xml file
// there is no way a browser can cache this.
// it is server script... and not file exist... 
This work pretty fine for me...
__________________
www.hk510.com
simonboris is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
one template, many looks? subquark ActionScript 1.0 (and below) 1166 10-29-2013 06:18 PM
Flash Video Encoder Compare gooogle Other Flash General Questions 3 01-17-2007 12:48 PM
How to load flash EMBED tags and movies with external script cybered HTML and JavaScript 1 09-23-2005 10:52 AM
Flash and the cache dannyst ActionScript 2.0 5 08-11-2005 05:58 PM
Cache ...Flash & Dreamweaver jika Simple Stuff (Newbies) 5 04-01-2004 07:16 AM


All times are GMT. The time now is 07:08 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.