ActionScript 3.0 :: Array Retrieval In Each Individual SharedObject
Jul 4, 2009
Code:
Frame44
var newstudent:String = NewFishInput.text;
var sl:SharedObject = SharedObject.getLocal("studentlist");
if(sl.data.hasOwnProperty('name')){
sl.data.name.push(newstudent);
[Code] .....
I have sharedobjects with names as above, i.e. there is a sharedobject name Jack, Another named Russell, etc. What I am trying to accomplish is to retrieve the student's name in SharedObject (studentlist) and use it to retrieve information in each individual's SharedObject.
View 1 Replies
Similar Posts:
Jan 19, 2010
I am able to save file using a local sharedObject.
Code:
note_so = SharedObject.getLocal("notes");
note = note_mc.notetitle_txt.text +"~"+ note_mc.note_txt.text;
[code].....
View 9 Replies
Dec 14, 2011
After spending a whole week on this,which most likely will turn out to be very simple, I have an xml file (with over 1300 cNodes) that is set up like this:
Code:
<?xml version="1.0" ?>
<rNode>
<cNode theWord="A" theSynonym="A" theMeaning="A" theExample="A" />
[Code].....
What I am trying to do is to create an array (arr =[]) that hold only the cNodes chosen in the "saveText" .. in other words the cNodes assigned the value var = 1 in the SO file.
Is this easier done as a temporary array or as second SO file.
View 9 Replies
Nov 20, 2009
if I need to make several entries, or can I put an array into SharedObject.data.
View 1 Replies
Apr 8, 2010
I'm saving several arrays into a SharedObject and I'm able to read them back fine from the SharedObject when the movie loads. However, one of these arrays contains numbers instead of strings, and the contents of this numeric array show up as 'undefined' when read back from the SharedObject.
View 0 Replies
Dec 19, 2011
This code seem to work fine; getting the array "arr" based on the SharedObject variables and picks only the ones with the value = 1. But when it gets to the function randArray(), all elements become "unidentified":
Code:
score = 0;
arr = [];
id = 0;
count = 0;
_xml = new XML();
[Code] .....
View 3 Replies
Jun 13, 2006
I am trying to set variables from an array. I want my variables to be named Pic1, Pic2 etc. (according to how many values are in the array).This is code from the "parsing external array data" tutorial**
files = new Array();
lv = new LoadVars();
lv.onLoad = function() {[code].....
View 3 Replies
Jun 21, 2009
What I have:
Code:
var glideShootingTimer:Timer = new Timer (500);
glideShootingTimer.start();
glideShootingTimer.addEventListener(TimerEvent.TIMER, glideShoot);
[code]....
What it does:Every half second create a torpedo underneath every "glide" sprite on the stage.What is wrong:Every "glide" fires at the same time as the others.What I need:A way to individually time the firing. A way to make it fire in independent half second intervals, not all at once.
View 3 Replies
Jan 11, 2012
I used var dp:ArrayCollection = new ArrayCollection(container.GetVotesResult); to get the JSON data from GetVotesResult method. I get the values as below.
[Code].....
How do I retrieve the 2nd, 3rd, 4th and so on (if it has) array datas individually and dynamically. Say, I want to take 'Atext' from all the array.
View 3 Replies
Jun 20, 2004
I've gotten as far as getting a listbox with a list of articles to display the articles in a dynamic text box, only i can only get it to work if i use one huge external text file that contains all the articles. what i want is to have each item on the list open up its own external text file, i.e. for each item on the list, there exists a separate text file. I'm about ready to put my fist through the monitor, and that would suck because this is a really nice monitor
View 13 Replies
Feb 18, 2012
I've installed developer version of Flash Media Server 4.5 and trying to get remote object, but no matter how I call my object all i get is this error .I've rad configuration guide and it told me that I should set StorageDir for shared objects, enable RPC (<RPC enabled="true">) and allow shared object (<Allow>users</Allow> in <RPC> - <SharedObject> tags)
View 1 Replies
May 17, 2010
Have an array which contains items in a comma delimited list such as below:
Code:
men,women,kids
outdoor,adventure
holidays,adventure
Am trying to use toString().split to further seperate them into individual entries in the array and it ain't working.
[Code]...
View 2 Replies
Jul 7, 2009
The code works fine, but I am getting unexpected results; the array seems to be shared across multiple instances of the same class? I've coded an example to highlight what is happening:
Code:
import myClass;
var instance:Array = new Array();
instance[0] = new myClass;
[Code].....
keep all objects/arrays separate across multiple instances of the class.
View 5 Replies
Dec 21, 2006
I'm designing a website aiming to provide visual coverage of surfing locations across the UK through the use of webcam images. Each of the images themselves will be retrieved externally,with permission, from various hotels over-looking these locations.I have spoken to someone who has completed a similar project,a widget which retrieves and displays webcam images, which can be viewed here:
View 2 Replies
Jan 12, 2010
Question: How do I create the ability to load a xml file from another domain?
For example, I am creating an embeddable video player that will play on the domain which the xml file resides and also embedded on other sites. I am to the point where the video player completely works on the domain that the xml file resides and when I embed it on another domain, the .flv plays but the xml data will not pull.
FYI, I have complete access to the domain where the xml file resides.
Here are some snippets of security settings that I have been trying to get to work:
Code from Player:
System.security.loadPolicyFile(domain + "data/crossdomain.xml");
Code from "data/crossdomain.xml":
<?xml version="1.0"?>
[Code].....
View 2 Replies
Jul 30, 2011
I'm writing a Flash game where the game levels are saved in small plain-text files, which I want to embed in the swf file. My current solution has a distinct code smell in its repetition, and I'm certain that there is a better way. My code is basically: In a LevelLoader class, embed all the levels
[Embed( source="levels/1.dat", mimeType="application/octet-stream" )]
protected var level1:Class;
[Embed( source="levels/2.dat", mimeType="application/octet-stream" )][code].......
There are a couple of problems with this approach: I have to add a line for embedding each level. Optimally, all files in a folder would be automatically embedded.A level can't be "prepared" from a string. I'd like to be able to pass LevelLoader a level number or level name as a string.I think that all strings are stored in memory rather than on disk.How could I program this "correctly"?
View 1 Replies
May 9, 2011
Gives me this error:
Error: Error #2134: Cannot create SharedObject.
at flash.net::SharedObject$/getLocal()
at as3_shared_objects/showVar()
[code]....
View 2 Replies
Feb 16, 2009
i need to stop a flv from playing again until the next day ( needs to be AS3).
View 2 Replies
May 12, 2011
Im trying to get Flash to rember if the logo_mc has been hitTested with the holder, and if it has when the movie is played again it appears in the box and not the original spot
var mySO:SharedObject = SharedObject.getLocal("ObjectPlace");
var logo_mc:Sticker = new Sticker ;
addChild(logo_mc);
[code]....
View 1 Replies
Nov 27, 2009
I have searched all of the engines to find out why my SharedObject code is not working. It works when I publish from flash but not when live? I have this code in the first frame and the movie starts on the second. I only want the user to have to view the swf every other time they land on the page containing the movie. I am using AS2.
var replay = SharedObject.getLocal("save");
if (replay.data.name == undefined){
gotoAndPlay(2);
[code]....
View 1 Replies
Feb 4, 2011
I have a slideshow that everytime you press a button show a new slide. Every slide is an external swf's that is being loaded in to the main swf. Inside every external swf there is a button that redirects you to another web page.What i would like to do is use SharedObject (or something like it) to remember wich external swf that was last shown when the user pressed the button redirecting them to an other page.How do i set the SharedObject in the external swf and then read it from the main swf?
View 1 Replies
Jan 25, 2011
According to the AS3 API the 'name' parameter in the 'getlocal' method is actually the name of the object. I have a bit of diffculty understanding this. Have alook at the following code:
[Code]...
If I were to access the attributes or methods of the shared object, can I use the 'name' instead of the variable, since the name is the 'name of the shared object'?
If the following code were used:
[Code]...
Why am I getting this error, if 'UserName' is the name of the shared object, than why can't I use it to refer to it's methods and other attributes? What is the meaning of it being a 'name' than?
View 1 Replies
Jun 22, 2009
I am working on a project that uses SharedObject and I have a question. I've made a button that downloads a flash screensaver and at the same time also creates a SharedObject which stores a specific id for each screensaver being downloaded. When later the screensaver is installed and run, it should get the SharedObject and read the id from it. When tested locally it works perfect since both the buttons´ and the screensavers´Sharedobject are stored in the same localPath. But when the button is online and the screensaver is local the SharedObject paths don't match.
Is there a way to solve this and make the local screensaver swf read the SharedObject from the same path as the online download button has stored it's SharedObject in?
This is the relevant code in both my swfs:
var _mySo:SharedObject = SharedObject.getLocal("name", "/");
If this won't work, does anybody have another solution to my remote to local screensaver thingy??
View 1 Replies
Jan 12, 2005
I have a normal XML menu, when I click in an item open the sub-item, my problem is the following one, when I click in an item DVD he goes to open an sub-item, and later I click en adventure, when I click in adventure I go for the next page, my problem is this, in this new page that I will be, my menu come back to normal the sub-item adventure is not selected in the screen, and I need that be selected, I already I tried to read the SharedObject in the F1, already I tried to find some tutorial to try to understand, but nothing,
View 2 Replies
May 27, 2005
with the code below, I can change the colour of the movie clip.I need the colour of that movie clip to stay the same also afternext time visiting the page. I think it's made by the action SharedObject.
function changeColor(code, obj) {
var ColorSet = new Color(obj);
ColorSet.setRGB(parseInt(code, 16));
[code]....
View 10 Replies
Jan 21, 2007
got my code working, and all information i enter in to my sharedObjects is working correctly as it should but isn't saving so when I close and then re-open the flash file the data isn't there? Admittedly I'm new to sharedObjects I'm using the [.data.] when entering info and then [.flush()] at the end of the function - is there anything I've missed?
View 5 Replies
Dec 21, 2007
this is just a simple question. Is it possible to set a sharedObject in a swf (say from www.A.com) , and then read that sharedObject from www.B.com , or even through the desktop (if the swf is playing directly on the desktop) ?
View 3 Replies
Jan 12, 2005
I have a normal XML menu, when I click in an item open the sub-item, my problem is the following one, when I click in an item DVD he goes to open an sub-item, and later I click en adventure, when I click in adventure I go for the next page, my problem is this, in this new page that I will be, my menu come back to normal the sub-item adventure is not selected in the screen, and I need that be selected, I already I tried to read the SharedObject in the F1, already I tried to find some tutorial to try to understand, but nothing, I need some help, this menu is for work.I am put the files.
View 2 Replies
Mar 31, 2010
make an interactive flash simulation of a display that has several different settings. these need to work individually so that the user can set the different indicators to the number they want. the picture shows the two main functions; a number indicator and a status bar (kind of like the reception bar on a phone).i have tried to get .swf files to load on top of each other, but they keep erasing previous settings in other indicators. is there a way to get this to work? or maybe a completely different approach that would be smoother? or can someone point me in the direction of a tutorial or a template that has this function?
View 4 Replies
Jun 23, 2004
[code]I would like to populate 'allLinks' with objects 's'.However I have been unsuccessfull in my attempts.I need this loop to work for a a large number of items so I dont really want to have to add each individual item.
View 2 Replies