RE: [Flashcoders] How to read variables from file into an array.
Why not using JSON? I haven't used it yet but this seems like a good opportunity from the examples I've studied. Because JSON is Javascript and more suited for AJAX applications - IMO it would take a lot more work using JSON in Flash than XML to get it working in Flash while achieving the same outcome. Jason Merrill Bank of America Global Technology Operations Learning Leadership Development eTools Multimedia Team ___ 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] How to read variables from file into an array.
Hello :) false ... JSON is more fast than XML in ActionScript ;) You can use JSON or EDEN : In my OpenSource framework (VEGAS) you can find JSON and EDEN implementation ... more speed, and keep the type of the properties (in xml you must check the string and transform the type after the parsing) The Eden page project : http://code.google.com/p/edenrr/ Vegas my OpenSource framework : http://osflash.org/vegas or http://code.google.com/p/vegas/ The SVN directory of the project : http://svn1.cvsdude.com/osflash/vegas/ The examples in http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/ The JSON examples (JSON 01.fla and JSON 02.fla) : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/string/ The Eden examples : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/buRRRn/eden/ The tools in the ASGard Extension to use JSON and EDEN : - http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/asgard/net/ ( JSONLoader.fla and EdenLoader.fla) - http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/asgard/config/ ( a config tool for your applications) - http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/asgard/system/(Localization 02 - Eden.fla) For me ... the xml is really a no-ECMAScript solution to use external datas with Flash ;) EKA+ :) 2007/3/9, Merrill, Jason [EMAIL PROTECTED]: Why not using JSON? I haven't used it yet but this seems like a good opportunity from the examples I've studied. Because JSON is Javascript and more suited for AJAX applications - IMO it would take a lot more work using JSON in Flash than XML to get it working in Flash while achieving the same outcome. Jason Merrill Bank of America Global Technology Operations Learning Leadership Development eTools Multimedia Team ___ 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] How to read variables from file into an array.
false ... JSON is more fast than XML in ActionScript ;) I didn't say ANYTHING about speed did I? IMO it would take a lot more work using JSON in Flash than XML - I discussed ease of implementation/use. The links you sent me only confirm my argument that XML is much easier to setup and use than XML in Flash. XML is also great to learn use when appropriate because of cross-system/software integration. It definitely has the upper hand there over JSON. Jason Merrill Bank of America Global Technology Operations Learning Leadership Development eTools Multimedia Team ___ 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] How to read variables from file into an array.
The links you sent me only confirm my argument that XML is much easier to setup and use than XML in Flash. Ooops. What I meant to type was: The links you sent me only confirm my argument that XML is much easier to setup and use than JSON in Flash. Jason Merrill Bank of America Global Technology Operations Learning Leadership Development eTools Multimedia Team ___ 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] How to read variables from file into an array.
Steve, Take a look at the LoadVars.onData() function. Essentially it gets called with the raw string of the text file before LoadVars.onLoad is called. onData's default behaviour is to do exactly what you discuss - splitting it up using the ampersands and URL encoding. Instead, you can make it do what you like - split the text on newlines and stuff it into an array, or whatever. Hope that's helpful, Ian On 3/7/07, Steve Abaffy [EMAIL PROTECTED] wrote: Hello, All the information I have found on this seems to indicate that the file is read as one big chunk into variable pairs. So if the file contains Var1=Something1 and Var2=Something2 these are split up by the system into var1 and var2 with their associated values. However what I would like to do is I have records for home listings all in a TEXT file. So my records look like Mls=123456 Price=123456 Bedrooms=4 Bath=2.5 Sqft=1200 Mls=988765 Price=654466 Bedrooms=3 Bath=1.5 Sqft=955 Etc.. I would like to read this into an Array_MLS(), Array_Price etc... but can no information on how to do this. Any help would be great. Thanks ___ 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] How to read variables from file into an array.
Why TEXT and not XML? -Original Message- From: Steve Abaffy [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 07, 2007 10:42 AM To: Flash Subject: [Flashcoders] How to read variables from file into an array. Hello, All the information I have found on this seems to indicate that the file is read as one big chunk into variable pairs. So if the file contains Var1=Something1 and Var2=Something2 these are split up by the system into var1 and var2 with their associated values. However what I would like to do is I have records for home listings all in a TEXT file. So my records look like Mls=123456 Price=123456 Bedrooms=4 Bath=2.5 Sqft=1200 Mls=988765 Price=654466 Bedrooms=3 Bath=1.5 Sqft=955 Etc.. I would like to read this into an Array_MLS(), Array_Price etc... but can no information on how to do this. Any help would be great. Thanks ___ 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] How to read variables from file into an array.
You should be using XML for this. It will handle larger more complex data structures. Ron Steve Abaffy wrote: Hello, All the information I have found on this seems to indicate that the file is read as one big chunk into variable pairs. So if the file contains Var1=Something1 and Var2=Something2 these are split up by the system into var1 and var2 with their associated values. However what I would like to do is I have records for home listings all in a TEXT file. So my records look like Mls=123456 Price=123456 Bedrooms=4 Bath=2.5 Sqft=1200 Mls=988765 Price=654466 Bedrooms=3 Bath=1.5 Sqft=955 Etc.. I would like to read this into an Array_MLS(), Array_Price etc... but can no information on how to do this. Any help would be great. Thanks ___ 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] How to read variables from file into an array.
I don't mean to derail this topic, but I have read about JSON so would this be an ideal spot for it? On Mar 7, 2007, at 7:50 AM, Hairy Dog Digital wrote: Why TEXT and not XML? -Original Message- From: Steve Abaffy [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 07, 2007 10:42 AM To: Flash Subject: [Flashcoders] How to read variables from file into an array. Hello, All the information I have found on this seems to indicate that the file is read as one big chunk into variable pairs. So if the file contains Var1=Something1 and Var2=Something2 these are split up by the system into var1 and var2 with their associated values. However what I would like to do is I have records for home listings all in a TEXT file. So my records look like Mls=123456 Price=123456 Bedrooms=4 Bath=2.5 Sqft=1200 Mls=988765 Price=654466 Bedrooms=3 Bath=1.5 Sqft=955 Etc.. I would like to read this into an Array_MLS(), Array_Price etc... but can no information on how to do this. Any help would be great. Thanks ___ 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] How to read variables from file into an array.
in around flash 4 you would have used a combination of string parsing functions like my_string.split() but an xml file is the answer now. i do understand that text parsing is still something you have to do sometimes, especially when integrating flash with older content delivery systems. tony properties property mls 123456/mls price 123456/price bedrooms4/bedrooms sqft1200/sqft /property property mls 123456/mls price 123456/price bedrooms4/bedrooms sqft1200/sqft /property /properties On Mar 7, 2007, at 10:59 AM, Ron Wheeler wrote: You should be using XML for this. It will handle larger more complex data structures. Ron Steve Abaffy wrote: Hello, All the information I have found on this seems to indicate that the file is read as one big chunk into variable pairs. So if the file contains Var1=Something1 and Var2=Something2 these are split up by the system into var1 and var2 with their associated values. However what I would like to do is I have records for home listings all in a TEXT file. So my records look like Mls=123456 Price=123456 Bedrooms=4 Bath=2.5 Sqft=1200 Mls=988765 Price=654466 Bedrooms=3 Bath=1.5 Sqft=955 Etc.. I would like to read this into an Array_MLS(), Array_Price etc... but can no information on how to do this. Any help would be great. Thanks ___ 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