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
Similar Posts:
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
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
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
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
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
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
Oct 21, 2010
How would one go about reverse engineering a page such as the this one to work out where the data being used to create the chart comes from?
View 1 Replies
Jan 15, 2011
it seems that flash has everything needed to
- accept periodic images from a source
- compress these images for transmission
- send them down the wire or perhaps to a local file
Now, is there any way to replace an actual camera by some bitmapdata object that periodically draws (part of) the application?
View 3 Replies
Feb 25, 2010
I want to use one data source (e.g. an Array) for multiple Datagrids that have different filterFunctions attached and show different columns.First, I thought I use a very straight forward apporach:create the Arraycreate an ArrayCollection for every DataGrid and set the "source" property to the Arraycreate the DataGrids and set their dataProvider property to its designated ArrayCollectionSo now. every ArrayCollection can have its own filterFunction, sort state etc. but there needs tos are dispatched and I have to call itemUpdated manually on each of the ArrayCollections. While debugging into the code in order to get a deeper understanding for Flex, I tried to figure out, what this misterious "itemUpdated" method does, especially as it notes in the adobe documentation, that, if no "property" is given (e.g. it is null), a simple "refresh()" will occur.
I did not find any calls to "refresh()" in the whole debugging (and I went down the framework whole as deep as possible (btw: lots of funny comments right in the code :-) )he only thing I could find was a CollectionChangeEvent getting dispatched with a PropertyChangeEvent in its "item" property. Which was of the kind "UPDATE" (and not, as I would expect "ADD"). When trying to dispatch that event manually, it never worked (e.g. the datagrid did not update).
View 1 Replies
Dec 29, 2011
I have a class with a contstructor that should only change the source of an image.
[Bindable]
[Embed(source='../pictures/test.jpg')]
private var _picture:Class;
[code]....
(the image is not an image, but a class)The problem is that when I call the constructor, let's say:
var test:Test = new Test(pictureAtStage.source);
Flashbuilder will give an error, becouse I can't tell the compiler what data type "newSource" at the constructor will have...
*edit:When i use _picture.source, the embedded source does not seem to be changed...?
View 3 Replies
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
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
Aug 16, 2010
I'm trying to visualize the results of a quiz in ActionScript 3.0.What I would like some input on is how to best link the "filters" (top right corner in attached image) to the data source in a flexible OOP way.The result array now contains both number of correct answers and meta data about the person taking the quiz. The meta data could be both discrete (sex) or continuous (age).
results = [{name: "Lisa", correct: 5, sex: 0, age: 52}, {name: "Peter", correct: 3, sex: 1, age: 32} ... ]
How do I tell the boxes to, for example, change color when I change filter?Should each box object hold its own data or should there be some sort of controller listening to the filter object to dispatch an event and thereafter call a box.setColor method?
View 2 Replies
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
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
Apr 5, 2010
I created a Jing video to describe my problem. In short, I'm not sure how external AS3 scripts are supposed to referenced, though I did get it to work in AS2 years ago.
View 3 Replies
Apr 10, 2011
I'm trying to have Flash execute a file, and I can get FSCOMMAND to work. Sort of. While I can use it to run a single batch file, what I really need to do is to pass a parameter from within Flash to the item being executed. I'm currently using Flash to allow a user to select some items, and I need to pass that selection out of it in order to kick off some other processes (Flash is basically just my GUI interface right now until I learn more about how to do things in it).
I don't care if it's a batch file or JavaScript or anything that's not uber complex (so no .NET or C++). I just need to find something that we can run internally for our company (either from an .HTML or a .EXE file output from Flash - not too picky there either).
View 4 Replies
Aug 28, 2010
i am having a problem when reading text form an external txt file into a textbox, the problem is that when i test/ debug my movie on my local computer the text displays from the file but after i have uploaded to my server and try and view it via the internet no text appears
Code:
var urlhome:String = "homeText.txt";
var loadit:URLLoader = new URLLoader();
[code]....
View 4 Replies
Jan 26, 2004
In the tutorial with that name there is this code:
Code:
on (release) {
loadText = new loadVars();
[code].....
View 5 Replies
Nov 5, 2005
I'm using this example [URL] at the moment, using buttons to feed text into a dynamic text box. What I've done is changed it to 'on (rollOver)' when the text pops up, and what I'd like to do is have a on (rollOut) and have it load a blank.txt so the text dissapears when you move your mouse away.
View 2 Replies
Mar 5, 2009
I have a very Simple Flash Player built in AS2. FlashCS3 I want it to load one external movie from root folder. BUT! i don't want to load a specific file name. I need the player to load whatever the file names. for example: if my file name is: Video.swf i want the player load it. and if i change the file name to video2007.swf it will still be able to load it.
View 6 Replies
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
Jan 26, 2004
In the tutorial with that name there is this code:
Code:
on (release) {
loadText = new loadVars();
[code].....
View 5 Replies
Feb 25, 2004
I wanna design a custom scroller kinda like the on... [URL] (right below the word welcome) I don't want to use the dull custom built in version MX provides cause lets face it, its ugly! and I'd like it to be linked to an external text document. I see this all over the place, so I'm pretty sure this is possible! Point me towards a tutorial or post an .fla with an example or something, I'm guessing a few other people may be interested too!
View 1 Replies
Jan 27, 2012
Is there a external-source-path option available in Flex compiler similar to external-library-path? My requirement is that, I am building a "SWC" file but I don't want to include certain folders inside my 'src' folder as these are anyway available in my other application during run time. (Trying to be resource constraint). So, I want to use these folders during compilation but do not want to include them in the generated "SWC" file.
View 2 Replies
Feb 23, 2009
xml can only be parsed with actionscript if its from an external source true or false?
View 3 Replies
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
Oct 5, 2009
I have two mx:TileList controls that I'm using to allow editing of objects in batch. The first contains a collection of all available data, and the 2nd contains the current batch. Both are bound to ArrayCollections, and using the native drag-n-drop functionality of the TileList control the data is moved from one ArrayCollection to the other when an object is dragged between them.
I need to change the currentState to show & reset the batch manipulation controls when the batch count goes from 0 to n or n to 0 items. Based on the documentation, I would have thought that I should listen to the dragComplete event, but my testing shows that instead of firing after the data has been removed from the source ArrayCollection and added to the destination ArrayCollection, it fires (consistently) between these two actions.
[Code]...
View 2 Replies
Sep 15, 2008
how to layer photos imported via an external source (XML) with other art elements? The imported XML photos always seem to arrive on top of anything else no matter what layer your XML code keyframe is on.
View 4 Replies