Shared Objects
Hi. I am currently building an MP3 player using Flash MX and ice Projector. The functionality of the playlist is based around a set of arrays. There is one array, called Artists, and another called Tracks, and a third called Files. Artists stores the artist names, Tracks stores the title, and files stores the streaming location. Each individual track is identified by it's loaction in the array. I am almost done except for the playlist. The problem I am running into is that I can't get it to save the arrays to Shared Objects.
I have the following function to display the array values in the playlist: (This works)
Code:
function loadList(Tracks,Artists) {
PlayList.removeAll();
for (i in Tracks) {
Song = Artists[i]+" -- "+Tracks[i];
PlayList.addItem(Song,i);
}
PlayList.sortItemsBy("data",asc);
}
Then I have this function to save the playlist, which is called when the user clicks the save button: (This doesn't work...)
Code:
function MasterSave(Tracks,Artists,Files) {
PL = SharedObject.getLocal("Cialnet_Playlist");
for (i in Tracks) {
PL.data.Tracks[i] = Tracks[i];
PL.data.Artists[i] = Artists[i];
PL.data.Files[i] = Files[i];
trace(PL.data.Tracks[0]);
}
PL.flush;
}
When the MP3 player is first evoked, the following function is run:
Code:
function LoadPL(){
PL = SharedObject.getLocal("Cialnet_Playlist");
if (PL.data.Tracks==undefined) {
trace("No Playlist");
}
Tracks = new Array();
Lengths = new Array();
Artists = new Array();
Files = new Array();
curTrack = 0;
pos = 0;
playing = "False";
// Defines track names shown in playlist and playing window
for (i in PL.data.Tracks) {
Tracks[i] = PL.data.Tracks[i];
Artists[i] = PL.data.Artists[i];
Files[i] = PL.data.Files[i];
}
_level0.LoadList(Tracks,Artists);
}
And obviously, the load function doesn't work either because the save function doesn't write anything to the SO...
Is there anything I have overlooked? From what I have heard, it is possible to save arrays into SOs, but this method isn't working. Much thanks for any help.
--Andrew
---Trmbne2000@hotmail.com
FlashKit > Flash Help > Flash ActionScript
Posted on: 11-17-2002, 05:59 PM
View Complete Forum Thread with Replies
Sponsored Links:
Shared Objects. How To Undo Shared Object
Hi guys,
Basicaly I created a simple login function by following the shared objects tutorial (http://www.kirupa.com/developer/mx/sharedobjects.htm).
I wanted a button placed on my wlecome screen allowing the user to go back to the creating screen of the shared objects.
So basically another shared object can be made.
Any Ideas?
View Replies !
View Related
Store And Retrieve Array Of Custom Class Objects From Shared Objects.
Hi,
I am stuck up with a problem in ActionScript 2. I am using Flash MX 2004 on windows XP.
I have created 3 custom classes say Parent, Child, and GrandChild. Parent class contains in it an array of its Child objects. Similarly each Child object contains in it an array of GrandChild objects. Also I do have one global array of all the Parent objects.
I want to store this array to the shared objects on specific events(say exiting the session) and then reload them from the shared object(on next session startup). I am able to store the global array to the shared object but when I try to retrieve the same array from shared object, I could not do it. The retrieved array is not of my custom class type [Parent].
Help needed to solve this problem urgently. Does anybody have idea how to do it??
Thanks in advance.
Cheers,
Naishadh Sevalia
View Replies !
View Related
Shared Objects
I've seen many tutorials on how to store text field info in "shared objects" and I was wondering if anyone knows if you can store other things in "shared objects?"
What I'm specifically looking to do is have the user select the background colour of the movie using the setRGB and then have this info stored in a shared object so when the user returns, the background will stay the same colour that they selected on their previous visit.
Any possible solutions would be greatly appreciated!
View Replies !
View Related
Shared Objects
I've seen many tutorials on how to store text field info in "shared objects" and I was wondering if anyone knows if you can store other things in "shared objects?"
What I'm specifically looking to do is have the user select the background colour of the movie using the setRGB and then have this info stored in a shared object so when the user returns, the background will stay the same colour that they selected on their previous visit.
Any possible solutions would be greatly appreciated!
View Replies !
View Related
Shared Objects
I am trying to assign the 'scheme' variable to 'grey' using a shared object.
This code loads on the first frame
mySO = SharedObject.getLocal("colors");
scheme = mySO.data.scheme;
and this should give the 'scheme' variable a value of 'grey'
on (release) {
mySO.data.scheme = grey;
}
I don't think it is, because if I look at the .sol file no value is set to 'scheme'
¿ #TCSO colors scheme
Any idea why?
View Replies !
View Related
Seeing Shared Objects On My Box
First:
Does anyone know where I can find my shared objects on my PC. I'm running windows 2000?
Second:
Does anyone know how I can retrieve the local path of a shared object in my code. By default the shared object is supposed to be stored under the "full path". I would like need to see what the full path is to troubleshoot a problem I'm having.
John
View Replies !
View Related
Shared Objects
I've searched the board on shared objects and found a lot of reference to the Macromedia site. Most all of the reference refers to using the shared object as a cookie to keep a name.
I want to use it so that it sees if they alread visited and if so it goes to the end of the .swf file.
I've found the code below but I can not seem to make it work. Has anyone successfully completed what I'm tring to do and if so could you help me out
------------------------
// setting up the shared object.
var mySO = SharedObject.getLocal("cookie");
// if we have something in stored we skip the animation.
if(mySO.data.stored)
{
// Frame is = the first frame after the anim.
gotoAndPlay(216)
} else
{
// if stored weren't found we store true
// in it to mark that the user has been here.
mySO.data.stored = true;
}
View Replies !
View Related
Shared Objects
Is there any way that I can save the .sol file along with my swf
Regards
Dabz
================================================== ====================
"Life is a mirror, what you do is reflected back to you, Be nice to
everyone"
================================================== ====================
View Replies !
View Related
HELP With Shared Objects
is it possible to record the top 10 highest scores sorted i order by using shared objects?? if so, then how is it done?
i badly need to know how to make a high score record for a game that is intended to be played on a standalone computer and NOT on the internet...
Please please help me....
thanks!!!
View Replies !
View Related
HELP W/ Shared Objects
is it possible to record the top 10 highest scores sorted in order by using shared objects?? if so, then how is it done?
i badly need to know how to make a high score record for a game that is intended to be played on a standalone computer and NOT on the internet...
Please please help me....
thanks!!!
View Replies !
View Related
Can I Do This With Shared Objects ?
ok i am trying to get the hang of this command and so far i got it to work. But now i want to go to the next step but dunno if thats possible and how.
I'm trying to make some sort of database in flash. what i was wondering is if it is possible that i can use a add another person option... so i can add new persons at any time and then when i alter the info and numbers of the person it will save it and i can see/edit those numbers again when i choose the person from a list ?!?
can i save all these persons in just one file ? or do i need to create multiple files, and if so how can i let it auto make a new file with info with persons name ?!?!
I hope i explained myself good enough
thanx in advange
assenoost
View Replies !
View Related
Shared Objects Help
Hi,
I'm trying to set up 'placeholder' of sorts, so that when a user clicks a "set bookmark" button, the _currentframe is recorded in a sharedobject. The next time the movie is run, the movie will automatically gotoAndStop to where the _currentframe was recorded (the frame the user was on when the "set bookmark" button was pressed)
I am attempting to do this with shared objects, rather than cookies.
My first frame is a blank key frame, with actionscript:
-----------------------------------------------------------
//create the local Shared Object
so = SharedObject.getLocal("bookmarker");
//if shared object has data already in it
if( so.data.placeHolder != null )
{
_root.gotoAndPlay( so.data.placeHolder );
}
------------------------------------------------------------
then, in subsequent frames, the user can click a button. This button has actionscript:
------------------------------------------------------------
on(release)
{
so.data.placeHolder = _root._currentframe;
}
------------------------------------------------------------
this method works perfectly when testing a movie, so if i set a bookmark, close the swf, and testmovie again, it will automatically jump to where i set the bookmark
the problem is when I export/publish, neither running the swf nor the html file works in whatever dir i publish to; the sharedobject data isnt remembered so the movie will always start at the beginning rather than the bookmarked frame.
I am guessing it is a problem associated with the path of the shared object and where it is stored. Is there a way to always store it in a user's IE cache?
Thanks for any suggestions
View Replies !
View Related
Oh Where Oh Where Have My Shared Objects Gone?
Just discovered SOs, and have replaced all my cookie scripts with them. Love them, and they are working just grand, but . . . I want to touch and feel them the way I can cookies. Where the heck ARE they on my hard drive? And can I expire them using the clock? Any tips on expiring appreciated. The MM documentation on them is a little weak. Okay, nonexistent in the help menu.
amy o'd
View Replies !
View Related
Shared Objects
Hi,
I am trying to make a drawing application in MX. I want the user to save his stuff file wise, and open them whenever he wants to and see the contents. I know how to use the shared object thingie in MX, but what I want is that the user can save the content(Ideally the frame of the movie) with a proper file name. And he can go on saving as many files as possible. He can then later open them and see the content.
Is it possible? Pl help
Thx
View Replies !
View Related
Shared Objects
I know I have been using the FlashKit Forum a lot lately. I have a major project and I am stepping out in new teritory with this one. I am a veteran viedo guy with lots of experience in animation with Flash and After Effects but when it comes to "True" interactivty and the more complex Action Scripting I have trouble. I need to know how to use Shared Objects in a stand-alone projector so that the first time the client runs the application they are using the default settings I have set for some of the options in the various panels. After they run the application for the first time, if they do not change any of the settings (defaults) I want those to stay in place, but once they do make changes I want to keep their settings for the next run. Please help.
Thanks!!
View Replies !
View Related
Shared Objects
Please help me with this one… I’m well and truly stuck.
I pray that there is a simple solution to my problem that does not involve databases, coldfusion, flash remoting …. Just flash, javascript or xml please !!!!
Step 1. A Pocket PC 2002 runs a flash 6 swf that creates and populates a shared object.
Step 2. The Pocket PC is connected to a Desktop PC.
Step 3. On the PC the user goes to a html page and needs to upload data.
Question. How can a swf or html running on a PC locate and read the contents of the Pocket PC shared object?
__________________
Here's hoping,
Regards,
Yvonne.
)
View Replies !
View Related
Shared Objects
Does anyone know how to store variables in the Shared Objects folder, like in the game Balloon Duel on newgrounds? I know how the folder works and everything, but I just need to know how to store the variables. Thanks.
View Replies !
View Related
Set Shared Objects Using PHP?
Is there a way to set shared objects using PHP?
My Flash site tries to remember the last page visited, regardless of using the Flash version or the html. When the flash website loads, it gets the SHaredObject data and redirects the user to the relevant page based on the last page it visited. If the user was browsing my site using the Flash version, it's all good. But if the user was browsing via the HTML version, then I would need to set the sharedObjects accodingly via PHP.
Another solution to this is using a cookie.. and im sure it's gona work for both Flash and HTML.. but i would like to know the sharedObject solution, if there ever is one.
Tea
View Replies !
View Related
Shared-objects
How do I go about to make a cookie in flash with shared objects? I want to play a diffrent swf depending on what kind of conection the visitor has. broadband or dial up.
/thanks
View Replies !
View Related
Shared Objects
I'm trying to make a really simple program so that I can come to grips with shared objects.
1 input text box
1 dynamic text box
1 save button
1 load button
Thats all I want to use.
I want to save data from the input text box when the save button is clicked.
I want to display the saved data in the dynamic text box when the load button is clicked.
Could someone please run through the code i'd need, I can't follow the information found at
http://livedocs.macromedia.com/flash...=00001664.html
properly. I don't know how to program well enough.
Thanks heaps.
View Replies !
View Related
Shared Objects
The way I see it shared objects is a replacement for cookies when a flash is run outside a browser. Is this correct? If so, is there any pros and cons for using shared object or cookies when a flash is run in a browser?
Thanks
/Per-Henrik
View Replies !
View Related
Shared Objects
trying to use several different shared objects to save some input text, but all the boxes keep saving the same piece of text. can u sgow me which bit of the code i need to change to have differnet shared objects?
myobject = SharedObject.getLocal("myData");
{mytext1 = myobject.data.user
}
View Replies !
View Related
Shared Objects
Hi all,
I have a Flash animation on my frontpage (the header), but I don't want the whole animation to replay on all other pages, how do I do it?
The site has HTML and the Flash header as well as a Flash menu.
I used this in Actionscript but my header animation and menu animation still replay from the beginning on all pages . . .
Thanks,
Kevin
function checkSO()
{
// If a shared object called siteSO already exists this will retrieve it otherwise it
// creates a new shared object called siteSO
var SO = SharedObject.getLocal("siteSO");
if(SO.data.visitedAlready)
{
gotoAndPlay("end");
}
else
{
SO.data.visitedAlready = true;
SO.flush();
}
}
// Put that and this in the first keyframe of your movie, before the intro
checkSO();
View Replies !
View Related
Shared Objects
Hi all ,
I am new to Flash. I am unable to find a tutorial on how to save data using shared objects in Flash CS. Can someone help me please. All i want it to do is to save a name from a textbox and the current time so that its there to be used next time i start the flash movie.
Many many thanks.
Q
View Replies !
View Related
Shared Objects
Hello there...I have 2 swfs and i'm working localy. In one I need to save some data and in the other I need to load it. So i'm using shared objects...my code is the following:
the saver:
Code:
user = SharedObject.getLocal("user_profile");
var name = "Jorge";
user.data.name = name;
//user.data.firstname = firstname;
user.flush();
the loader:
Code:
user = SharedObject.getLocal("user_profile");
trace(user.data.name);
i think the code is right...BUT NOTHING HAPPENS...
ANY HELP?? WHAT IS WRONG WITH IT??
THANKS A LOT!!
View Replies !
View Related
Shared Objects - Help
Hi All...
Does anyone know if your able to put a classes into shared objects and keep calling their methods.
Eg.
i have a class Dog where dog has a bark method (dog.bark()
Code:
var goodDog:SharedObject = SharedObject.getLocal("mydog");
if (goodDog.data.myDogObject==undefined)
goodDog.data.myDogObject= new dog();
goodDog.data.myDogObject.bark();
i'm able to call the goodDog.data.myDogObject.bark() and have it work whenever Flash either first makes the SharedObject or i clear the shared object...
any help would be much appreciated
Thanks
Zirus
View Replies !
View Related
Shared Objects
hi there.
as the topic suggests im after some help with sharedobjects.
i have 2 main swfs that i wat them to to beable to read a set of global variable in an independently loaded swf.
the 2 main swfs are loaded with key commands within each other but the other i with the global variables i want them to detect is loaded on its own independently.
I was told theres a way to do this via shared objects but im unable to figure out how and before u ask it is impossible for me to upload a fla. but heres a diagram i drew up in paint to show u how i want the global variables to be sent via shared objects.
url = http://www.actionscript.org/forums/a...1&d=1161642207
and another thing i was wonder is it possible to load an external swf via loadmovienum but then not unload it but have it set behind everythin else so its still running in the back ground and then when the user wants to bring it forwad they just press the same command they use to load it.
thanks in advanced ur help is most appreciated.
View Replies !
View Related
Shared Objects
I have written a c++ program that reads in a sharedObject and begins parsing the data, so far I can extract all the header info, the name of the first variable and the type it is. The first type of variable I am trying to get the value for is a Number, but I am having trouble with getting the value of it. It seems that the value is incrypted in some way. I've tried searching for more information on this but all the stuff I find on the file format of a SharedObject does not talk about anything being encrypted.
Another question, is it legal to talk about dissecting the SharedObject file format?
View Replies !
View Related
Shared Objects Help
hi guys im making a game atm and i have a shared objects highscore, its working fine, the scores pass through, problem is i have first, second, and third. obviously i want the the highest score at the top, for some reason its just putting the last played score on the top, over and over. dunno whats going on his my code can anyone help me???
stop();
scorefin = SharedObject.getLocal("highscores");
var thescore = _global.finalScoreShiftAsNumber
var thetimer = _global.finaltimeasnumber
if (timer1 == undefined) {
score.data.timer1 = 0;
timer1 = 0;
}
if (timer2 == undefined) {
score.data.timer2 = 0;
timer2 = 0;
}
if (timer3 == undefined) {
score.data.timer3 = 0;
timer3 = 0;
}
score.flush();
if (thetimer > timer1) {
scorefin.data.timer3 = scorefin.data.timer2;
scorefin.data.timer2 = scorefin.data.timer1;
scorefin.data.timer1 = thetimer;
scorefin.data.score3 = scorefin.data.score2;
scorefin.data.score2 = scorefin.data.score1;
scorefin.data.score1 = thescore;
} else if (thetimer==timer1 || thetimer>timer2){
scorefin.data.timer3 = scorefin.data.timer2;
scorefin.data.timer2 = thetimer;
scorefin.data.score2 = thescore;
} else if (thetimer == timer3 || thetimer>timer3) {
scorefin.data.timer3 = thetimer;
scorefin.data.score3 = thescore;
} else {
trace("nothing");
}
timer1_txt.text = scorefin.data.timer1;
timer2_txt.text = scorefin.data.timer2;
timer3_txt.text = scorefin.data.timer3;
score1_txt.text = scorefin.data.score1;
score2_txt.text = scorefin.data.score2;
score3_txt.text = scorefin.data.score3;
cheers
View Replies !
View Related
Shared Objects
Hi people,
I know that you've probably seen hundreds of these threads and i apologise for that, but i've just read http://www.actionscript.org/resource...ects/Page2.htm and i'm afraid i'm still pretty confused.
I am trying to use SharedObjects to save progress in a game.
Example Scenario:
When you enter a frame (say Level 2) it uses SharedObjects to store a bit of information (e.g. the word "lvl2") that you have entered this frame.
Therefore, when you change scenes to a "level select," the "level 2" button would remain locked (e.g. frame 1) unless it sees that the SharedObject for level 2 (the word "lvl2") has been saved and therefore it would be unlocked (e.g. frame 2)
I had thought that in frame one of "Level 2" it would have something like:
ActionScript Code:
lvl2 = SharedObject.getLocal("lvl2");
Then on the level select button it would have code saying
ActionScript Code:
if (lvl2 = exists) {
this.nextFrame(); }
however i do not understand what actionscript i need for this as "exists" is clearly not AS!
Have i got completely the wrong idea!?
Please correct me.
Thanks in advance.
View Replies !
View Related
Shared Objects
Hi.. i am currently having difficulties using shared objects to do a high score list. Can someone please help me?? It's really urgent.. PLease help!!
My codes are something like this:
(these codes are written on my first frame)
if( (so.data[ "name" ] != null) && (so.data[ "score" ] != null) )
{
txtName.Text = so.data[ "name" ];
txtScore.Text = so.data[ "score" ];
}
(these codes are written on the frame that i want the scores to be loaded)
if( (txtName != null) && (txtScore != null) )
{
so.data[ "name" ] = txtName.text;
so.data[ "score" ] = txtScore.text;
trace(txtName + txtScore);
so.flush();
}
View Replies !
View Related
Help With Shared Objects
I am new to flashcomm and I am having tons of problems with SharedObjects. Right now all I am trying to do is create my own people list and am trying to use SharedObjects to do it but am running into problems of them not sharing anything in between or if they are even getting the data. I know I have tons of bugs probobly, but the book I am reading and using for reference isn't doing me much good because its tutorial didn't work on the SharedObject. Here is the code I am using so far.
Server-side:
ActionScript Code:
load("components.asc");
//The first function that is run when the application is started, it initialises the variables
application.onAppStart = function()
{
//creation of server variables//
//----------------------------//
user_names = []; //creates a blank array to contain the users names
user_names[0] = 0; //initialises the first member of the array to having no users
user_conversations = []; //creates a blank array to hold the users conversation
user_conversations[0] = 0; //initialises the conversations to having none
chat_room = []; //creates a blank array to hold chat room variables
//initializing the variables to now be shared objects//
//---------------------------------------------------//
Users_so = SharedObject.get("Users", false); //initialises the SharedObject
Users_so.setProperty("UserNames", user_names); //attaches the user_names array to the shared object
Conversations_so = SharedObject.get("Conversations",false); //initialises the shard object for private conversations
Conversations_so.setProperty("Private_IM",user_conversations); //attatches the array that holds the conversations
Chat_so = SharedObject.get("Chat",false); //initialises the chat array
Chat_so.setProperty("Global_Chat",chat_room); //attaches the chat array to hold the global conversation
trace("Application Started");
//end of code for onAppStart function
}
//This function runs when a user connects to the application
application.onConnect = function(newClient,UserName,UserPassword)
{
//accepts the user to the connection
application.acceptConnection(newClient);
//adds the user to the usernames
user_names.push(UserName); //actually adds the users name to the list
user_names[0]++; //adds the user
trace("User Successfully added");
//updates the username array
Users_so.setProperty("UserNames",user_names);
trace("UserNames updated");
}
And here is what I am trying to use to access it on the client side
ActionScript Code:
//enabling the netconnection debugger
#include "NetDebug.as"
//beginning coding of the net connection
var myConnection_nc:NetConnection = new NetConnection();
//trace function
myConnection_nc.onStatus = function(info){
trace("LEVEL: " + info.level + " CODE: " + info.code);
}
//connect function
appLogin = function(){
//making the connectio to the server
myConnection_nc.connect("rtmp://***.**.*.***/odu_flash_chat",login_txt.text,login_txt.text);
initSharedObjects();
}
connectionLight_mc.connect(myConnection_nc);
var connect_pbListener:Object = new Object();
connect_pbListener.click = function()
{
appLogin();
}
connect_pb.addEventListener("click",connect_pbListener);
initSharedObjects = function()
{
var Users_so:SharedObject = SharedObject.getRemote("Users_so",myConnection_nc.uri,false);
name_txt.text = Users_so.data.UserNames[0];
}
Users_so.onSync = function(info)
{
if(info[UserNames].code == "change")
{
name_txt.text = Users_so.data.UserNames[0];
}
}
By the way the book is: Macromedia Flash Communication Server MX. by: Kevin Towes
View Replies !
View Related
Shared Objects
Hi guys I have an input dynamic text field which when you hit save button, the text typed will be saved. Now i'm trying to add more then one, and after researching I found out its called shared object path or something like this. I found this but i have no clue how to do the swfs and stuff. Can someone explain or provide a great tutorial of how to create more than one text fields which are saved? thanks
View Replies !
View Related
Shared Objects
Does anyone have an example of using shared objects between action script 3.0 and Flash media server with multiple parameters in the function? here is my situation, I am using shared objects for a chat type application. The server receives the message and sends it out to all the clients. This works fine. But I want to send out some other information with the message for text formatting purposes. When I try to send out the multiple parameters the client only recognizes the first parameter. Any help or samples would be greatly appreciated. Thanks.
View Replies !
View Related
Shared Objects
Hey,
I'm building a video chat application and I have the following situation:
The user logs in and either starts a new chat or enters into an existing chat. Can I send a message to a user that is in a chat room that the other is not in?
Also,
Is it wise to have 2 connections going at the same time? Because if I can't do the above I was thinking about loading a messaging application that everyone signs into intially and have that handle the messages to individual users. Then open another connection when they want to enter a chat or start a new one.
Thanks,
JoSh
View Replies !
View Related
Shared Objects
I read the tutorial about the shared objects and i would like to know if there is a way to have an object timeout so let's say after 30min the shared object would be "invalid" and flash would create a new object with the same name as the old object.
View Replies !
View Related
Shared Objects
Please help me with this one… I’m well and truly stuck.
I pray that there is a simple solution to my problem that does not involve databases, coldfusion, flash remoting …. Just flash, javascript or xml please !!!!
Step 1. A Pocket PC 2002 runs a flash 6 swf that creates and populates a shared object.
Step 2. The Pocket PC is connected to a Desktop PC.
Step 3. On the PC the user goes to a html page and needs to upload data.
Question. How can a swf or html running on a PC locate and read the contents of the Pocket PC shared object?
View Replies !
View Related
Shared Objects
Im Trying To Use A Shared Objects to Save Mutiple Stats On Movie But I Dont Think Im Doing It Right
This Is My Code:
Quote:
//Create Stats Cookie//
User_Stats=SharedObject("Stats Cookie")
//Send Variables To Cookie//
User_Stats.data.UserAsukaRelation=0
User_Stats.data.Usertrength=0
User_Stats.data.UserIntelligence=0
User_Stats.data.UserCharm=0
User_Stats.data.UserMoney=1000
//Save Variables//
User_Stats.flush();
Also If This Is Right How Would I Retrive The Data In A Different Movie
View Replies !
View Related
Shared Objects
Hi,
Below i wil detail what i am attempting to do:
What I am trying to do is make a music player for a website that runs 'constantly' not pausing, stopping or getting reset whe a user changes page in the site.
To achive this I have created two flash movies a control swf with play stop etc. and a player swf which receives instructions from the control and loads in the sound file and changes volume.
To avoid inturruption in the playing music when the user changes page I have put the control swf in a frameset with the rest of the page content and the player swf in a seperate frame.
The problem im having is that the two are not comunicating with eachother 'dynamically' i.e as soon as an instruction is sent. They only update when the page is refreshed.
I think the problem may be with the use of the flush fuction?
Can anyone shed any light on how to use this?
Thanks
View Replies !
View Related
Shared Objects Help
I've read the tutorials and posts and nothing I do seems to work.
I'm doing a flash site and I have different skins for it. For the sake of understanding, I have 2 buttons, a default one and a blue one. When I click on the blue one, the background color changes to blue and if you close the swf and reopen it, I want the blue background to appear.
The background is in an MC named "bg" and all the colors will be on a diff frame inside of it.
Here's what I have for the first frame:
Code:
visitor = SharedObject.getLocal("skin_pref");
if (visitor.data.skin == undefined) {
visitor.data.skin == skindefault;
visitor.flush();
} else if (visitor.data.skin == skinblue) {
bg.gotoAndStop("blue");
}
On the blue button I have this code:
Code:
on (release) {
visitor.data.skin == skinblue;
bg.gotoAndStop("blue");
visitor.flush();
}
I have no idea why it's not working, it looks right to me and I've spent countless hours trying different things. Can someone please help?
View Replies !
View Related
Help With Shared Objects
I'm trying to setup a situation in my comic where the user chooses one of two options, to side either with goblins or a dwarf. I would like to set it so that if the user chooses the goblins, it updates a shared object that keeps that choice saved on the computer for the next time they watch the movie so it skips the asking process. I've tried everything I can think of to get them to work, and the choice will replay if you are in the movie, but once you close it, the choice is not saved.
The .fla file can be found at www.manatheater.com/MXhelp2.fla, the initial set up is in Scene 0, Layer "Masking", Frame 0. The button code is in Scene 2, Layer GLeft and Gright, Frame 459. The replay code that checks the variable can be found in Scene 2, Layer "Masking", Frame 416. The variable for the choice is "gob", gob==1 is for goblins, gob==2 is for dwarf.
I normally don't post on forums like this, but I've been trying to solve this for a couple of hours now, and it's startin' to drive me crazy! Thanks for any and all help you can offer.
Here, also, is the AS I am using in the above mentioned places:
Scene 0, Layer "Masking", Frame 0:
myLocal_so = SharedObject.getLocal("rockcookie");
if (myLocal_so.data.choice == undefined ) {
var gob=0;
} else {
gob = myLocal_so.data.choice;
}
On one of the buttons, Scene 2, Layer GLeft and Gright, Frame 459:
on (release) {
var gob=2;
myLocal_so.data.choice = 2;
myLocal_so.flush();
gotoAndPlay("Scene 2.8", 1);
play();
}
Again, any help is most appreciated.
View Replies !
View Related
Help With Shared Objects
Im was experimenting with Shared objects but i can't get this experiment to work. All i want it to do is went a message is typed into the message box it can be saved and viewed again and again even after it is closed. If erase is clicked the message is deleted. Thanks for the help and if you can fix it can you explain wat it was that i did wrong.
View Replies !
View Related
Shared Objects
here;s the deal: my footer, as you all know, can be cutstomized via shared objects. No big a deal. but the problem im facing is this: i have a new version of my footer up, but it still displays the contents of the old shared object. i've flushed the new contents in, but it still wont display them unless you click options>reset. any ideas why this is happening and how i could rectify this problem?
View Replies !
View Related
Shared Objects
I'm using a shared object to determine when a user visited my site last. According to the date of their last visit the site will have different looks. I would also like to have different looks for users, who visit for the first time and users who simply do not allow cookies (i.e. shared objects) to be stored.
Is there a way to determine whether a user is visiting for the first time or whether they simply do not allow flash to save anything to their hard disk?
View Replies !
View Related
Shared Objects And JS
I've got an idea (icio says it's already been done, and Signifer bashed it).
Anyways, I think Shared Objects could be used instead of cookies… you could send content from JS to Flash easily (this is already common). It would be stored in the user's computer, and would be accessible from then on… always, and easily.
Another important thing is… the cookies are available in every browser. For example, the background color of the header on Kirupa… I change it, and can see the new colors in every browser I have.
So… watcha think? It's never been done so that it was easy to use…
View Replies !
View Related
Shared Objects
Good Day to all!
Quick question. Is it possible to set the local storage limit for shared objects using action script rather than the Flash Player context menu?
Thanks!
View Replies !
View Related
|