| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Feb 2003
Location: Rome
Posts: 1
|
I need to know how i can create and fill an array of this kind via external source:
ActionScript Code:
The source can be an external text file or dynamic data form ASP Please, give me a code snippet!! Thanks in advance, Maxil |
|
|
|
|
|
#2 |
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
IMHO I would serialize it on the server with wddx. ASP can do it with a library so look it up on google. Get the wddx_mx.as file from macromedia's site,
http://www.macromedia.com/software/f...ds/components/ Load the data in and deserialize it and you are done. This is MX only ActionScript Code:
BAm now retVal holds your data structure. Try it you will be amazed. |
|
|
|
|
|
|
|
|
#3 |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,881
|
WoW.... Freddycodes always shows me something I have never heard of almost EVERYDAY, and I am MAD!!!
Distributed Data Exchange (WDDX) FAQ here in case someone, like myself, need to know what WDDX is... and much more information about WDDX right HERE... Do I need to get the FMX Remoting MX Components installed to get that wddx_mx.as file, you have mentioned, freddycodes??? I don't see any other link on that page rather than the Remoting stuff... Okay, Maxil... I have answered similar question yesterday and you might want to take a look at this thread and get the file that I have attached, testlv.zip, to see if this one helps you... If you go over the thread, you will know why and what that file does... Good luck... ![]()
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
#4 |
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
Firstly don't confuse remoting components with remoting. Flash remoting the beast that doesn't support php and costs an arm and a leg? No. The components whcih are just a set of actionscripts you can download from that page, yes. They are free and are not "Flash remoting"
I have stumbled across the greatest thing ever today. Using XMLSocket with PHP and wddx to create a real time data exchange. I will post more as soon as I whip up a sample and a PHP to access. |
|
|
|
|
|
#5 |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,881
|
Oh... I guess I haven't paid much attention to the naming... As you have suspected, I thought that Flash Remoting and Flash Remoting Components are the same thing... Hehe...
Downloading... Approximately 15 more minutes to download that 6MB file with 56k... Oh... I want my cable back... Sigh... Why did I move to this apartment??? ![]()
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
#6 |
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
BTW if you want to know how to get started with PHP and wddx and Flash
http://www.actionscript.org/tutorial...thin_Flash_MX/ |
|
|
|
|
|
#7 |
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
This is the same thing as the tutorial but its realtime through a socket connection.
http://www.irq11.com/~louie/freddySe...ddyServer.html If you have a PHP binary running with --enable-wddx and --enable-sockets let me know and I will put up the source. This one actually accesses a php class and returns data from it. |
|
|
|
|
|
#8 | |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,881
|
Geez... There is no way I can consume that much information... That's just too much...
I'll do some experiment when the project that I am currently doing is done... Thank you for the information... ![]() Got a couple of questions though... Quote:
The example you mentioned is kinda the same thing that I have seen from the Scripting forum...(I think jimburton started the thread...) One thing I am not quite getting is that, I think, I can create the same thing which calls MySQL database with PHP in Flash... Can you briefly go over the advantages of using WDDX rather than MySQL database??? Thank you... ![]()
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
|
|
#9 | |
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
Yes I mean compiling your own copy of php on unix. If you are windows, you simply uncomment the line in the php.ini that says
extension php_sockets.dll Quote:
The advantage is, its less work to write your php scripts as if you were doing regular html, then use those same scripts to deliver the same data back to flash. Lets take the example of using regular xml in flash. You have to loop through the results to get the data you want in flash right? wddx, you run deserialize and it its there like magic. Its hard for me to get it across in words, one my add, two I havea hard time communicating what I am thinking The example above is using sockets, the difference is it passes the data across a socket instead of through http, like flash's xml and LoadVars, it uses XMLSocket. Read that tutorial and try to set the same thing up on your machine, thats really the only way to understand it. |
|
|
|
|
|
|
#10 | |
|
Super Moderator
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,881
|
Thank you for the kind answer, freddycodes...
Quote:
I see lots of places I can utilize WDDX... I'll get onto it as soon as my project is done... I probably will have to bug you many many times though... ![]()
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer http://CyanBlue.FlashVacuum.com http://www.FlashVacuum.com http://tutorials.FlashVacuum.com Do NOT PM, Email or Call me... Your question belongs right in this forum...
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Associative arrays | Mortimer Jazz | ActionScript 2.0 | 23 | 05-12-2004 06:11 AM |
| loading an object from an array | NateVeronica | ActionScript 2.0 | 1 | 03-30-2004 11:53 PM |