ActionScript 2.0 :: Shared Object Not Working - Output Is "undefined"
May 5, 2005
Does anyone knows why the output is "undefined"?:
mySo = SharedObject.getLocal("kookie");
myButton.onPress = function(){
mySo.data.nome = "dados de utilizador";
mySo.flush();
trace(mySo.nome);
}
View 2 Replies
Similar Posts:
Mar 14, 2011
I am trying to write a piece of code to retreive data from a SOL file : this is my code :[CODE]//get External interfaceimport flash.external.*;
[Code]...
How can that be ? what can I do ? What am I doing wrong ?(bear with me, as I said, I'm kind AS newbie).
View 4 Replies
May 5, 2005
Does anyone knows why the output is "undefined"?:
mySo = SharedObject.getLocal("kookie");
myButton.onPress = function(){
mySo.data.nome = "dados de utilizador";
[code]....
View 2 Replies
Apr 17, 2006
I have followed the tutorial on Shared Objects with possitive results, and have found answers in the forums, only thing is, as soon as I get my files on the server VERY strange things start happening. (Locally there is no problem) I have two files in the same folder (on the server and locally)
[Code]...
View 5 Replies
Sep 13, 2009
I'm working on AS3 on main timeline. I have 20 frame labels parte1 to parte20. On parte1 I have a preloader and SharedOject code. The preloader works fine. On parte8 I have a movie clip (whole_master), which contains three frame levels (g_level_1, g_level_22, and g_level_33). Each frame contains a level of a game. My sharedObject doesn't work.
Code:
//Saving data
var so=SharedObject.getLocal("learningGames", "/");
so.data.whole_master=whole_master;so.data.g_level_1=whole_master.g_level_1; so.data.g_level_22 =whole_master.g_level_22;so.data.g_level_33 =whole_master.g_level_33;
//testing if shared object exists
[Code] .....
View 2 Replies
Mar 13, 2009
I created a very simple experiment to attempt to access the same shared object in Flash Player and AIR.
A Flash SWF creates a local shared object.
A AIR application (being tested from CS3 or installed) opens the same shared object.
The data does not persist. Is this theoretically possible?
View 1 Replies
Nov 18, 2005
On the timeline, I set up an array with 'section' names. When the mouse is clicked, a listener traces the section name to output.
Code:
var pageName:Array = new Array();
pageName [0] = "newsHolder";
pageName [1] = "aboutHolder";
pageName [2] = "reelHolder";
pageName [3] = "printHolder";
[Code] .....
That works fine. But I also have a button on the stage:
Code:
on (release) {
trace ("testing "+pageName [0]);
}
But this returns "testing undefined".
View 5 Replies
Mar 11, 2008
I am using a dynamic nav menu edited using xml, when the corresponding button is pressed I want it to display some text in the text box and load a .swf into the loader m.c. It sort of works, however which ever button I click on it displays the content text and .swf for the last button listed in the xml file, when I try to set a var equal to the instance name of the button clicked on it shows the text as undefined and does not load the m.c? If I leave out the var 'currentIndex' I get a message in the output Error opening URL file undefined. I've checked everything and there are no typos.
Code:
var yPosition:Number = 0;
var myXML:XML = new XML();
myXML.ignoreWhite = true;
var links:Array = new Array();
var names:Array = new Array();
[Code] .....
View 1 Replies
Mar 25, 2009
I created a new slideshow in flash CS3 - AS3 but my code that I had for xml caching is barking at me and I am not sure what to do. The output window shows access to undefined property root.
[code]...
View 2 Replies
Apr 17, 2010
i have done all the code so my video will only play when i go to that specific page for my website and wont continue playin if i go to another page... but when i do all my code i get this in the output when testing... now I know all the code is right because im following a tutorial:
[Code]...
View 5 Replies
Jan 22, 2011
I'm using a loader for people to use to upload their own images for a background, and I want it to remember the image the next time they come to the page, so is there any way to save the loader data in a shared object? I haven't tried just using something like
Code:
sharedObject.data.dataName=loader
because I assume it doesn't work that way.
View 9 Replies
Apr 22, 2006
I wanted to separate my embedded fonts to save filesize, so i've put them into sharedLib.SWF, and then preloaded sharedLib.SWF into flash using another SWF so that i could use these fonts further in multiple FLAs, without consuming additional bandwidth. I followed one tutorial, and checked out many different ones, to see if this issue occured to somebody else too. I had no luck finding the solution. Furthermore, i want to embed these fonts into AS-created textfields using AS.[code]I tried to create 1 TF manually, and placed it on the Stage, setting its display text to one of the embedded texts (Tahoma*). This actually worked! And one more strange thing happened.. Three of those TFs created using actionsctript, which were before blank, were NOW also filled with correct embedded text, EXCEPT one textfield which used Tahoma text non-bold, non-italic [!?]. Now how does this happen, and why the exception, i wonder.
View 2 Replies
Apr 11, 2012
I have a very simple test going with shared objects in flex with mobile I have a person class.
package
{
import flash.display.MovieClip;
[Code]....
If I clear out the so it show the [object Person] again, but comment out get the ,,,
Can shared objects even store an array of objects properly. It is the same with the persistanceManager I believe.
View 1 Replies
Feb 13, 2010
I have a PHP file located at http:[url]....which looks like
Code:
<?php
$one = 40;
$two = 60;[code]........
which is basically the code to create a pie chart.Is it possible to use the variable "onev" in frame 1 for the value in my movieclip "share_value[0]",and use the variable "twov" in frame 1 for the value in my movieclip "share_value[1]",so basically my PHP variables are used to control the values on
Code:
share_value[0] = 40;
share_color[0] = "0x82b1cf";
share_value[1] = 60;
share_color[1] = "0xb4cfe2";
I have been hacking around with this for days and tried so many things, such as setting global variables etc, but nothing seems to work and I either nothing or I get "undefined" in my output box.
View 1 Replies
May 20, 2008
Just wondering if you can use more than one shared object, as my AS code doesn't act as i would think
Code:
---this one works
var submenu_so:SharedObject;
submenu_so = SharedObject.getLocal("menu");
[Code].....
View 1 Replies
Jun 24, 2009
Can I use Flash Shared Object to pass information between two different SWF files on two different pages within the same website?I know it can if the SWF files are the same. But what if they are different Flash object with different SWF files?
View 7 Replies
Jan 28, 2010
Does anyone know if it's possible to save and access a LSO from an EXE projector on a CD?
Obviously the LSO couldn't be saved on the CD itself - would it be able to save the LSO somewhere on the users hard drive?
View 4 Replies
Sep 15, 2008
I'm trying to use the Shared Library process for the first time with audio files and I'm not sure why it's not working. I've followed both processes from here:[URL] and have a library file called libTestAudio.swf with all the audio files set up right (see Flash file here [URL] My question is should the testAudio.swf ever grow in file size? When it has no content it is at 4Kb but when it has the shared library file added to the timeline it becomes 8Kb. Now this might sound small but I've tried this with much longer pieces of audio and the file size does get bigger for testAudio.swf . I was thinking that only the libTestAudio.swf file would increase in file size and testAudio.swf would remain at it's 4Kb size. Am i wrong there?
View 0 Replies
May 28, 2009
I made a shared object whiteboard but I have a stupid problem with removing objects. This is function to clear shared object :
public function clearShape (so:SharedObject):void {
trace('clear:', this.name);
delete so.data[this.name];
[code].....
View 2 Replies
Aug 7, 2011
I was thinking if there was a way to remove the shared object pop up from popping up lol?Its because Im making a game where when the player saves the pop up comes up over a 100 times and it's really frustrating, so I was thinking if you could remove the pop up entirely by using actionscript?I've found a script that shows the popup:System.showSettings(1);So is there a way to reverse this script? like System.hideSettings(1); ?
View 1 Replies
Jun 9, 2009
I have a client who has a video that is to only play once when a user visits. So I created a shared object to create a param that the video has been played. It works perfect locally and on my live test site. However when the client posts it on his ning website in the header it doesn't work. The strange thing is that live and locally on my server you can see the shared object and it's size through the advanced tab in Flash's privacy settings.
View 7 Replies
Aug 23, 2009
I have a gane that uses shared object and keeps note of highscores and users names. So - if that is possible then I can set up teaching courses on standalone pcs can't I? ie: Databses I have in access can go in XML and the recording of position in course and results of tests can also be recorded using Shared object.Is that a good way of going about things OR should the whole thing go over to AIR and its sqlite system?
View 3 Replies
Sep 21, 2009
I have 2 ways of accessing info in my course files (SWFs): text-only and audio playback. I'd like to use shared object to store the user preference so it remembers the setting when navigating between screens. It stores info file but each file creates its own shared object.
for example:
<path to the swf>page1.swfcoursename.sol
<path to the swf>page2.swfcoursename.sol
<path to the swf>page3.swfcoursename.sol
Since it writes and reads the SOL file of its own folder, the user setting isn't remembered when switching pages.
View 3 Replies
Nov 1, 2006
I am running a chat program which displays a list of users along with their status (online or offline). I wish to remove the list and display their status in their respective biographies, which are separate swfs. The usernames and status are stored in a remote shared object as an array.My question is, what is the most efficent way of extracting an individual user's current status from the SO array?[code]
View 2 Replies
Nov 21, 2006
how to rewrite the Shared Object? Is it possible?
View 7 Replies
Apr 10, 2010
Is there a way in which xml can be saved as shared object?
View 1 Replies
Oct 30, 2009
I was trying to obtain data I wrote using a sharedobject location from one application on another, but it didn't seem to work(used same machine). So I take it local stored data is only allowed to be accessed/manipulated from the application that initially wrote data to it?
Is this is for security reasons? Is there anyway around this, I want to have one application read variables from another...
View 1 Replies
Oct 13, 2010
I am building an application that uses a Shared Object that is shared (ironically) between 3 separate applications. 1 application listens for updates, and the others update the app. The problem I am having is that I need the main application to be able to detect changes to the Shared Object. Unfortunately there seems to be no events to listen for that are not for 'remote objects'. Because of this I created a timer that gets a new local instance of the shared object every X seconds.I just call the following before I read or write to the sharedObject:[code]This is causing a CPU Hiccup every 3 seconds and bogging down the system. so all this being said, does anyone know of a clean way to refresh a copy of the sharedobject without creating a brand new instance of it
View 2 Replies
Mar 31, 2010
I'm having trouble storing a dataprovider in a shared object. Writing the dataprovider object to my local shared object seems to work fine, but when I try to read this out of the shared object, it appears to have been transformed into a generic object. When I try to assign a local dataprovider variable to the dataprovider I've read out of the shared object, I get the following error:
"cannot convert Object@3721e6c9 to fl.data.DataProvider"
View 7 Replies
Sep 16, 2009
read a local shared object with a servlet even if there is no flash present on a page? I want to set a local shared object like a cookie, and then access it again from a page that doesn't have a flash movie.If I can't do this, is it standard to have the initial flash movie call an external javascript to set a traditional cookie that can later be read?
View 1 Replies