00:00
00:00
Newgrounds Background Image Theme

KiToDaAra just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

High Score table

1,826 Views | 9 Replies
New Topic Respond to this Topic

High Score table 2005-05-23 23:24:34


Hi,

I created a high score table using the Flash MX 2004 data grid component. When a function in my script it called, it used the LoadVars function to get data from a PHP script. The data from the PHP script populates the data grid fine. Then there is a refresh button. This is where the problem is. In Mozilla Firefox, the refresh button works fine. In Internet Explorer, when the refresh button is clicked, the high score list does not update with the most recent high scores. Also, even if you refresh the entire page, you still do not see the updated high scores. The only way to see the updated high scores is to close the Internet Explorer window, and open the game in a new window. Is this happening because IE is caching it? Is there a way to tell IE not to cache it within the flash document?

Thanks for your help,
~David

Response to High Score table 2005-05-23 23:33:21


You'd need to send the Cache-control header somehow. And it needs to reach the user before any html output or anything. With PHP you could do it. Either with Cache-control: no-cache or Pragma: no-cache.


"Days of planning. Weeks of building. Months of perfecting. Seconds of smashing."

BBS Signature

Response to High Score table 2005-05-23 23:39:57


Hi,

Would that go on the script that sends the high scores to flash, or the page where it is embeded? If it goes on the embeding page, I don't think I'll be able to use it because not everyone may have the cache control on their site. Would it refresh maybe if I destroyed the LoadVars object somehow? It seems like the box is changing, it's just not getting the new data.

Thanks for the help,
~David

Response to High Score table 2005-05-24 00:28:32


Hi,

Ok. I found the solution. At the end of the url you are getting the variables from put this: cachebuster=" + new Date().getTime(); And that stops it from caching the loadvars.

~David

Response to High Score table 2005-05-24 06:16:18


Hi,

You know,you don't have to say Hi every time you post,moderators won't ban you for not saying Hi!


BBS Signature

Response to High Score table 2005-05-24 06:19:13


OMFG!Denvish is browsing this forum,quickly,everyone edit your post and say hi! Sorry,I went a bit too far with this,plus,I am off topic so I will stop annoying you...


BBS Signature

Response to High Score table 2005-05-24 06:38:22


At 5/24/05 06:19 AM, Dark_Toaster wrote: OMFG!Denvish is browsing this forum,quickly,everyone edit your post and say hi! Sorry,I went a bit too far with this,plus,I am off topic so I will stop annoying you...

Hi!


- - Flash - Music - Images - -

BBS Signature

Response to High Score table 2005-05-24 06:48:48


Hi,

It's always good to remember that moderators have sens of humour and don't always follow the rules,Denvish,you spammed {>:-p]
I thought you'd fall in the trap,not say hi,and I would report you for not sayng HI...


BBS Signature

Response to High Score table 2005-05-24 06:52:31


(Hi,)

Aha!I found something in Denvish's sig

• 23 • 7 • 34 • 16 • 7 •
- Active Audio Mod -
- - - Report Abuse - - -

Is it abusive when you don't say hi?
Anyways,Newgrounds fellows,if you see someone not saying hi,
do not forget to click REPORT ABUSIVE!
(I am really sorry for spamming your whole thread,I don't have a clunch about highscore,I just clicked a topic randomally,you are unlucky >:( )


BBS Signature

Response to High Score table 2005-05-24 06:58:09


At 5/23/05 11:24 PM, GamesCool wrote: Hi,

Just a quick note: if you're intending to upload your game to NG, Flash's sandbox security will prevent it from working unless you do two things:

1) Add this line on a frame before you loadVars
System.security.allowDomain("http://yourDBdomainname.net");

2) Open notepad, and paste this in:

<?xml version="1.0"?>
<!-- http://www.yourDBdomainname.net/crossdomain.xml -->
<cross-domain-policy>
<allow-access-from domain="*.ungrounded.net" />
<allow-access-from domain="*.newgrounds.com" />
</cross-domain-policy>

Save it as 'crossdomain.xml' (MUST be name that), and upload it to the root of your database/php domain


- - Flash - Music - Images - -

BBS Signature