ActionScript 2.0 :: Loading Array From External Data Source Possible?

Aug 13, 2004

Possible to load an array from a external data source. I.e. like from a .txt file? I tried putting this in the external text file:
mytest = new Array("dadada")
It loaded, but not as a array, just as text. I am using LoadVars.

View 3 Replies


Similar Posts:


Data Integration :: Handle Double Quotes In Data Read In From External Source?

Mar 14, 2011

I'm trying to read some data in from a sql source, some of which contains double quotes embedded in the text. I know I can strip the doublequotes, but don't want to go that route if I can avoid it. I've tried replacing to double quotes with hex codes before passing the text via parameter to my flash file, but the text string always cuts off at the hex code, the same as if the double quote were present in the string. For example:This is a "text" stringreplace double quotes with hex: This is a x22textx22 stringesults when read into flash: This is a <remainder is dropped>Yet if I type the same text string in a variable in flash, the string displays the double quotes properly:

View 1 Replies

ActionScript 3.0 :: Loading External Data To An Array Syntax Error?

Jan 25, 2009

I'm trying to load data from an external text file into an array. I created an array and am able to load the data into an array if I explicitly say something like

ActionScript Code:
array[0] = event.target.data.uid1_name;

I can then do a trace statement on array[0] and it will output the correct name from the file. My problem is I'm trying to iterate through the variable names in the text file in the file by using an index variable. This is the code I'm using after doing all the URLloader, URLRequest, and so forth stuff:

ActionScript Code:
for(var i = 0; i<20;i++){
fArray
= event.target.data.uid_name;
}

This produces a syntax error. I've tried several other syntax variations but haven't been able to figure it out. I've also tried the following:

fArray
= event.target.data["uid"+i+"_name"];
fArray = event.target.data.["uid"+i+"_name"];
fArray
= event.target.data."uid"+i+"_name";

All three of those also give me errors. For the first one the trace statement outputs "undefinded" instead of "Doug". For the second I get "syntax error. Expecting identifier before left bracket". And for the third I get "syntax error, expecting identifer before uid.":

syntax to iterate the number after uid(uid1_name, uid2_name, uid3_name, etc)?

View 3 Replies

ActionScript 3.0 :: Loading External Data To Array (Syntax Error)

Jan 24, 2009

I'm trying to load data from an external text file into an array. I created an array and am able to load the data into an array if I explicitly say something like:
ActionScript Code:
array[0] = event.target.data.uid1_name;

I can then do a trace statement on array[0] and it will output the correct name from the file. My problem is I'm trying to iterate through the variable names in the text file in the file by using an index variable. This is the code I'm using after doing all the URLloader, URLRequest, and so forth stuff:
ActionScript Code:
for(var i = 0; i<20;i++){
fArray[i] = event.target.data.uid[i]_name;
}

This produces a syntax error. I've tried several other syntax variations but haven't been able to figure it out. Why syntax iterate the number after uid (uid1_name, uid2_name, uid3_name, etc)?

View 3 Replies

ActionScript 3.0 :: Getting Data From External 'source' ?

Mar 19, 2011

what would be the best way to do the following :

Allow me to briefly sketch the situation i'm in; On my stage i've got a collection of movieclips, each has an unique name. These MC's represent regions of a country on a map.

The most basic task i'd like to achieve is when the user mouse-overs one of these regions, it displays some relative info on the region (Name, size, population etc)

I was thinking about storing this info externally from the fla/swf itself. When the swf lauches it would retrieve the corresponding info for each region.

Having this data outside the swf would make editing and upkeeping it more easy.

I'm leaning towards looking into an XML-file to do this ? (SQL sounds neat but i have no expirience with it)

The Swf would be hosted on a site, but i see it evolve as an AIR-app in the future.

View 2 Replies

ActionScript 2.0 :: Array From External Source

Jul 21, 2004

Im making a component for a companies wesite, it is simple enough they want a list of phrases to be displayed one at a time in random order... not a problem. Its just that they want to be able to update the phrases themselves = external txt file to populate the array. I dont work with arrays often enough so I was wondering if someone could tell me the way to populate an array using values in an external txt file.

View 2 Replies

ActionScript 2.0 :: Array From External Source?

Jul 21, 2004

Im making a component for a companies wesite, it is simple enough they want a list of phrases to be displayed one at a time in random order... not a problem. Its just that they want to be able to update the phrases themselves = external txt file to populate the array.

View 2 Replies

IDE :: Setting Up An Image Array From An External Source?

Apr 23, 2009

I have a question about setting up an image array from an external source. I have the following action script and would like to edit it so that it reads from an external file. Either TXT or XML. how to edit the array action.

CODE:

spacing = 10;
image_array = ["image01.jpg", "image02.jpg", "image03.jpg", "image04.jpg", "image05.jpg", "image06.jpg", "image07.jpg", "image08.jpg", "image09.jpg", "image10.jpg", "image11.jpg", "image12.jpg", "image13.jpg", "image14.jpg",

[Code]......

View 3 Replies

ActionScript 3.0 :: Loading Variables From External Source?

Jan 23, 2011

How to load variables from an external source? For example, Lets say I have a movieclip that contains 6 keyframes, and I want flash to load the proper keyframe when the main swf is opened. Flash knows what the proper keyframe is, because that variable is stored in a MySQL database, or txt file, or xml file, or whatever. Also, how could i have flash write to an external file, so that i can save the changes.

View 2 Replies

ActionScript 3.0 :: Loading External Text Which Will Then Be Used As A URL Source?

Apr 1, 2009

Using Flash CS4 professional And Action-script 3.0 I am currently working on an mp3 player in flash.I have my main fla file in my root folder.Also in my root folder is a folder names 'source_files'Inside the 'source_files' folder there is.A folder named 'songs' (which holds several mp3 files) and a text file named track_list.txt The text in track_list.txt is set out as follows (example values used).

//song1
//song2
Where '//' represents the start of the name of each song.

From within the project I have a code that loads track_list.txt and uses the split function to split the loaded data into an array before adding 'source_files/songs' to the beginning of each index of the array.

[Code]...

View 2 Replies

ActionScript 2.0 :: Loading Text From External Source?

Jan 26, 2004

In the tutorial with that name there is this code:

Code:
on (release) {
loadText = new loadVars();

[code].....

View 5 Replies

Create A Flash Website That Loads Data From An External Source(CMS)

Jun 2, 2009

how to create a Flash website, that loads data from an external source(CMS),  that can be indexed by Google?  Indexed by Google looking at the SWF and not shadow HTML pages.  Or exactly why such a site cannot be indexed by Google.  I have found several articles; however, none get into technical details or are by Adobe.

View 1 Replies

ActionScript 2.0 :: Loading Movies In Flash From External Source?

Jul 6, 2009

Do you have any tips, or a link to a good tutorial? I'm a bit of a newbie...

View 4 Replies

Actionscript 3 :: Source From External Folder (linked Source) Not Appearing In Flex?

Aug 26, 2010

i have a Air Project in which i have added three extenal source folders. but when i reopen project or strat flash builder again i get icon on those folder like this but when i open the configuration for that project and try to validate the path and adding it again i get message like this but the path is valid. proof is this pic what could be possible error,,, is there any way that i when ever re-open project i get no warning and able to navigate through the linked source code. now i am doing it

1- deleting on of the linked folder

2- again adding that folder.

View 2 Replies

ActionScript 2.0 :: Converting Internal Array Data Into External XML Data?

Nov 9, 2006

I have this code inside my flash to name my navigation menu. Now I want to put this outside flash and load it via XML. How do save my different arrays into a variable for later use in my code?

In my nav fla (what i want to load from XML):

Code:
// MAIN MENU ARRAY
var mm_array:Array = ["MAIN1", "MAIN2", "MAIN3", "MAIN4"];
// SUB MENU ARRAY

[Code]...

View 9 Replies

Actionscript 3 :: Using External Xml Data In A Flex Application Without Compiling The Source Into The Application?

Jul 15, 2011

I want to read xml data to a mxml application from a xml file on my filesystem. The example I found was for AIR,link2, link3. But I want to target the Flash Player runtime. If I use the the tag, I can do it; however the xml compiles into my swf. How can I retain the xml file in my release build?

View 2 Replies

ActionScript 2.0 :: Entering External Data Into Array?

Feb 1, 2009

I have written a simple program to randomly generate the name of a student from my class. Other teachers have asked if they could have a copy but as you can see from the code, I have to manually enter their students' names into the array.I wonder if there is a way to enter a list of names into the array from an external file so that teacher's can enter their own students' names and change them when needed.

(here is the code for a button that generates the students names)

on (release) {
_root.student1_txt.text = "";
myStudents=["Chloey","Paul","Rachel","Kudzayi","Josiah","S arah C","Daniel C","Micahel","Daniel Ha","Daniel He","Amanda","Tammy","Zach","Sam","Sarah M","Xanthe","Charlotte","Bethany","Luke","Jessica"

[code]....

View 5 Replies

Data Integration :: Ext. Data Source And Tree Component?

Nov 12, 2007

Im using tree component and XMLConnector here.as far as i can see results in my tree (when testing my movie) it ouputs data thats loaded fom ext. XML file.But the problem is that it publishes [type Function] in the tree. no actual xml nodes are visible, just bunch of [type
Function] ive also searched for info / tutorial how to publish actual xml data in the tree component but without any luck.So what should i do and how ?

View 2 Replies

Data Integration :: Loading An External XML

Jul 21, 2006

Is there a way to load an XML file if it's on a differen server/domain than the html/swf file? I already set allowScriptAccess="all" but it didn't seem to help.

View 1 Replies

ActionScript 3.0 :: Loading External Data XML Or CSV?

Jan 15, 2009

Having done loads of it in the first few years of this century, I've not done much Flash in the past few years, been focused on PHP/MySQL Development. Anyway, I now need to use the data from a MySQL database offline in a Flash executable so I'm jumping back in with AS3. There are several tables involved and I can write a script to export the data to whatever format is best.

XML or CSV? Should I get it all into one file with all the data or is it possible to do the quivalent of joined queries once the data is in Flash? I don't need a full explanation at this stage,

View 8 Replies

Actionscript 3.0 :: Loading External XML Data

Apr 19, 2010

I built a simple application to load XML data using a external XML file. However, the link I am using will have a different Presentation ID each time a user creates a presentation. So some how the presentation ID needs to be know before I actually load the XML file at least in my mind it does. Is there a way to load the URL dynamically or set my url loader up so it loads whatever ID there is?

[Code]...

View 1 Replies

ActionScript 2.0 :: Loading External Data?

Jan 13, 2006

I have an external text file that will have two variables and look like this:&months=January,February,...&days=Sunday,Monday,.. .I am using loadVars to load the textfile in. When it is done loading, I want to load each of the of the 2 variables into an array so I have an array for months and array for days

View 7 Replies

ActionScript 2.0 :: Loading External Data (MX)?

Jun 7, 2006

Ok, lets see if i can explain this right. I have been trying to make a movie that loads different information from an external file each day. I name the external files according the the date that i want it to be imported (example: 200667, for today)Ive been able to make the .getYear(), .getMonth(), .getDate() work to make the date in the above formatxmlData.load(" ");<-- now when i write in the url to load the external file is there a way that i can write it so that it will update itself to the correct date so that i dont have to update it manually myself?

View 2 Replies

ActionScript 3.0 :: <b>loading External Data With For Of XML</b>?

Mar 16, 2009

I have a pretty CMS that generates an XML and I want to make part of the site loading that data (menu items, thumbs, info, and big pics) is there an way to make all that using for?here is my XML code

Code:
<albums>
<gallery id="1" name="design" path="gallery/1/">

[code]......

View 1 Replies

AS3 :: Loading External Swf In Array Using Wildcard?

Sep 27, 2010

I can use the following code to load in a specific swf:
 
var clips:Array = ["001/001.swf"];
 
but how do I tell Flash to load whatever file is in the 001 folder without stipulating a specific filename?

View 1 Replies

ActionScript 2.0 :: Loading An External Array?

Jan 6, 2010

I am building a jukebox for a website, which has a genres, bands, and tracks list.These are all populated from a MySQL DB. The info is dumped into a listbox component.ll of the lists are working, but on the tracks list, i need to pull the track name,and its filepath. So that I can assign the track name to the lable property, and the filepath to the data property.My problem, is that I cannot get a multiple value array from php to flash, it keeps coming up as undefined.

PHP Code:
echo "&testArray=[["track1","filepath"] ["track2","filepath"]]";// i have not put the query in i dont think the problem is there

[code].....

View 2 Replies

ActionScript 2.0 :: For Loop For Loading External Data?

Jul 28, 2009

I have a bit of a problem finding the correct syntax. I have a whole lot text variables here. The myLV value is in a external text file. So myLV.nr1 from my external textfield is loaded in ovrnr1.text. This way I can easily change the value in my text document.

ovnr1.text = myLV.nr1;
ovnr2.text = myLV.nr2;
ovnr3.text = myLV.nr3;
ovnr4.text = myLV.nr4;

If I put it like this it works fine but I thought, hey, in stead of writing
150 of these I can put it in a for loop. So I tried this.

for (i=1; i<150; i++) {
ovnr[i].text = myLV.nr[i];
}

However, this does not seem to work ? And could I do it to a button too ? So instead of writing 150 button onrollovers I could also make a loop for it ?

Something like
for (i=1; i<150; i++) {
this.btn[i].onRollOver = function() {

[Code]....

View 2 Replies

ActionScript 3.0 :: Loading External Data Not Working?

Feb 7, 2011

I have a listBox and I want to take data from a php file and insert it in my list box. But I am doing something wrong, because it's not working.
 
The php file retrives data in the following format:
 
echo "nrsongs=" . $nr_songs;
$i=0;
foreach($song_ids as $song_id){
$i++;

[Code].....

View 2 Replies

ActionScript 3.0 :: Loading External Data (dynamically)?

Jun 21, 2011

I am trying to load dynamic data into text fields with in flash (.swf)  the system is a closed circuit (no internet & web access)  basically there are about 10 standalone computers connect through a network and one central computer  i created a flash which will be downloaded to all the computers at once and each computer has a unique (name).My goal is to load  the different data into the text field for each computer:Computer 1 would have winner 1 Computer 2 would have winner 2and so one........Steps the code should do..1.  call function and load the "unique (name)."of the computer by going to("c:/myharddrive/local.ini"); flash will reconize the "ini file to say "this is computer 12.  then have the txt request come from("c:/CMS/MediaFiles/Data2.txt");when i publish the file out there is no errors-When I view the files on each computer there is no data  (blank screen")so my guess it is not seeing the path for newURLRequest("c:/myharddrive/local.ini");r new URLRequest("c:/CMS/MediaFiles/Data2.txt");can anyone breakdown the code and let me know how flash can go to those specific areas on each individual computer and pull the data into flash

View 1 Replies

ActionScript 3.0 :: Xml Data In External Domain Not Loading?

Jun 26, 2009

[URL]when i test the site on my computer with flash it works. when i upload to the internet the xml data is not picked up. when i had the xml data in the same subdomain it worked both on my computer and in the internet...but i need the data to be accessible...

i have tried adding cross domain "policy files" for permission, but either they are not working, or i am doing it incorrectly...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved