Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-29-2001, 10:00 AM   #1
lakoutan
Registered User
 
Join Date: Sep 2001
Location: Finland
Posts: 17
Cool Problems with PHP and Arrays

Hi,

I have this minikarting game and there is ghostcar showing the best lap. Ghostcar have 3 arrays: x_pos, y_pos and rotation. I use MySQL database to save these arrays.

how Can I receive arrays from PHP? I have tried to print variables in String and split that in Flash but that doesn't work becouse it's too slow. There are about 1200 values and LoadVariablesNum works just fine when I transfer Strings to flash, but String.split function is so slow

You can find this half-done minikarting game:
http://www.minikarting.com (finnish language verion )

Lauri
lakoutan is offline   Reply With Quote
Old 09-29-2001, 01:05 PM   #2
lakoutan
Registered User
 
Join Date: Sep 2001
Location: Finland
Posts: 17
Default Any other ways to receive an array?

Does anyone know better way to receive arrays to flash?
(than changing String to Array with String.split-function)
Please help me if you know!

Lauri
lakoutan is offline   Reply With Quote
Old 09-30-2001, 03:19 AM   #3
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

The String.split() that comes with Flash is slow but you can overload it with Branden Hall's version which is about 40% faster (try searching these forums... or asking on Flashkit.com... or www.figleaf.com which is Branden's site). Best alternative would be to use PHP or some such to write your data in XML format, which is native to arrays. You'd have to learn/know XML though.
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 09-30-2001, 03:24 AM   #4
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

search the forums for 'branden Hall' and checkout the thread called 'string into array'
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 09-30-2001, 10:16 PM   #5
lakoutan
Registered User
 
Join Date: Sep 2001
Location: Finland
Posts: 17
Thumbs up Thanks Jesse!

that helped me a lot, THANK YOU! Now it's quick enough...
lakoutan 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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems Splitting arrays from loadvars 7year ActionScript 2.0 1 02-17-2005 06:03 PM
PHP and Arrays Eimos Server-Side Scripting 2 01-01-2004 12:34 PM
passing arrays from php to flash boyzdynasty Server-Side Scripting 9 04-18-2003 03:12 PM
Passing arrays PHP -> Flash JohnnyS Server-Side Scripting 2 10-08-2002 05:32 PM
HELP - GURUS NEEDED!!! Strings Arrays and PHP hektate ActionScript 1.0 (and below) 8 03-14-2002 01:03 PM


All times are GMT. The time now is 05:41 PM.

///
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.