ActionScript 3.0 :: SharedObject Persisting Between Browser Tabs

Nov 26, 2010

I'm building an online app which opens a SharedObject at its onset to do various things, one being remember whether a user has performed a certain action(vote) before because he/she is only permitted to perform this action once. This is all working fine, until our users began opening a new tab before voting.
 
If the user opens a new tab, and open the same application, this app(tab 2) needs to know if subsequently the user votes in tab 1. I thought this would be straightforward to resolve. However - for some reason, the sharedObject in tab 2 does not seem to update with updates in tab 1... if you were to refresh tab 2, it would have the updates, but while it is open, the data in the sharedobject does not seem to update.
 
It all works fine in general, the only time it doesn't is when there are two instances of a flash object open at the same time using the shared object. Maybe this is expected behaviour, and two flash objects can not use the same local sharedObject? It's hard to find this info in the livedocs.
 
This is the sort of code I am using to manage the SharedObject: (I know the first question anyone will have is, are you the flushing the object after setting your variable, the answer is yes!)
 
// i call this function at the beginning of the app
public function init(sharedObjectName:String):void
{
sharedObject = SharedObject.getLocal(sharedObjectName,"/");

[Code].....

View 5 Replies


Similar Posts:


ActionScript 2.0 :: Flash Keeps Opening Hundreds Of New Tabs In The Browser

Aug 25, 2010

I have found solution for my previous problem:

onClipEvent (load) {
_root.hitz = 0;
this._alpha = 0;

[Code]....

but now I have a new one! After fifth click browser keeps opening hundreds of new tabs! I think it's because flash keeps playing movie. There must be some kind of loop and every loop flash opens new tab. I tried to add stop(); in few different places but still no result.

View 4 Replies

ActionScript 3.0 :: Monitor Browser Tabs With LocalConnection And Sense When A User Closes A Tab

Jun 28, 2009

In my application the browser window connect with long polling(comet) with the server. If the user open several browser tabs, only one of them(called the master) communicate with the server and serves as a proxy for the other tabs. I want to use flash localConnection to exchange data between the tabs. What happens when a user closes the master tab that holds the comet session? I can use javascript with the unload event to inform the other tabs that the master tab is closing and then close the localConnection but the unload event is unreliable. I can use polling to monitor the master tab connection object but it sound dirty.

When the master is closed one of the other tabs need to become the master. How do I make sure only one of them tries to become the master? If a user close the tab without flash being able to close the localConnection, will it cause a memory leak?

View 0 Replies

ActionScript 3.0 :: Monitor Browser Tabs With LocalConnection And Sense When A User Closes A Tab?

Jun 28, 2009

In my application the browser window connect with long polling(comet) with the server. If the user open several browser tabs, only one of them(called the master) communicate with the server and serves as a proxy for the other tabs.I want to use flash localConnection to exchange data between the tabs.What happens when a user closes the master tab that holds the comet session? I can use javascript with the unload event to inform the other tabs that the master tab is closing and then close the localConnection but the unload event is unreliable.I can use polling to monitor the master tab connection object but it sound dirty.When the master is closed one of the other tabs need to become the master. How do I make sure only one of them tries to become the master? If a user close the tab without flash being able to close the localConnection, will it cause a memory leak?

View 2 Replies

Flash :: Html - Movies In Inactive Browser Tabs Pause Or Don't Execute In Real Time

Apr 7, 2010

I'm noticing some unexpected behavior. Some time in the last few months, a change in either Firefox, the Flash player, or both, has made it so that Flash movies that are in inactive browser tabs no longer execute in real time. They appear to still execute, but only in bursts, and not in a predictable way. This is a problem because I develop a Flash-based (Actionscript 2.0, Flash CS3) multiplayer game that maintains a network connection and allows players to chat, etc.

[Code]...

View 2 Replies

ActionScript 3.0 :: Persisting Model Over Sessions Of Swf

Feb 2, 2007

So I had been working on this issue where I couldn't get a swf to reload in the same state it was originally loaded. Well further testing leads me to believe that my Model class is being persisted over multiple sessons in the player. Here is my model class:

[Code]...

So when I fire up the swf the first time in the IDE's player, i get 'no previous instance' as you would expect, then I hit ctrl + enter to restart the swf in the IDE's player and I get 'destroying instance'. So this tells me that the Model instance is getting persisted over player sessions. Unless I am mistaken, and correct me if I am wrong, I would assume clicking ctrl + enter (i.e refreshing the swf in the player) would act like a new swf session.

View 3 Replies

Media Server :: SharedObject.NoAccess Error When Trying To SharedObject.getRemote?

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

ActionScript 1/2 :: Object Variables (arrays), Persisting To A New Keyframe?

May 4, 2009

After unexplainable problems with external class files, I'm trying another way of doing what I need to do:  an Object variable declared in the fla file. Well, this has its own set of problems. The big picture is:  I need to get user data and populate fields in their profile when they sign on.  Then save changes to their profile during the session, add new users and make changes to their profiles.  Pretty normal stuff.
 
Here's the problem I'm having with the object.
 
Frame 1  Script:
 
/* Define the object to use as an associative array.*/
var Person:Object = new Object();// Define a series of properties.Person.HomName = "Joe";Person.HomEmail = "joe@gmail.com";
  
Then go to a new keyframe, where I have my fields that need to be populated
 
Script:
 
EnterName.text = Person.HomName;EnterEmail.text = Person.HomEmail;stop();
  
When I compile, I get this error twice (once for each field) "The property being referenced does not have the static attribute."
 
What does the mean and how do I fix it?
 
Here is a link to the source file if you care to look.
 
[URL]
  
The only way I've been able to get variable data from one script to another is through a _global.variable.  Is this the only way?  No arrays or objects vars?
 
Thanks in advance for all who assist.  Some day soon I hope to be able to return the favor!

View 3 Replies

ActionScript 2.0 :: Stop Swapdepths In Flash Persisting For The Whole Scene?

Apr 2, 2010

I have a small interface at the begging of my scene (frame1) using the swapdepths command to stop background buttons being clicked beneith pressed button menus. AS on Button inside movieclip (MC):

[Code]...

The next few frames are seperate pages and do not contain this interface yet all the buttons selected from the frame1 interface are still prominant in every frame after this. How can I disable swapdepths in the frames after this?

View 2 Replies

ActionScript 3.0 :: SharedObject Error: Error #2134: Cannot Create SharedObject?

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

Set So Windows Open In New Tabs?

Aug 31, 2009

I'm kind of new to flash, and I'm working in CS3 AS3. Here is my code. - Home is my button instance name

[Code]...

Now, _top, _self, I can't get anything to work for what I want to do. What I'm trying to do is make it so when I click a link, it opens it in the SAME tab. I have seen many (dozens) of these problems, but none seem to help. On firefox, it openes in a new tab, (I have it set so windows open in new tabs), on IE it opens in a new window, and in chrome it opens in a new tab. Please help me fix this problem,

View 5 Replies

Actionscript 3 :: How To Put Tabs In Application

Dec 7, 2010

how to put tabs in application using only actionscript, there are lot of examples there using flex mx controls for tabnavigator, but i want to use only actionscript or flashscript.

View 2 Replies

Linking Tabs To Different Pages On Website?

May 23, 2010

I am fairly new to flash and I have started to attempt to modify a template that I found online to make it my own. The thing that I am having problems with is the URL Links. There are 5 different clickable tabs on the header that I have, and when you edit it in flash cs4, each one is the same image when you edit it. The only way in which you can change what each one of them says is by editing them in the library. This isn't the problem. I want to link these tabs to different pages on my website. When I edit one of them, all of them change to the same url link. The file is too large for me to upload I think.

View 4 Replies

Flash Selects The Tabs In The Next Line?

Jun 14, 2009

I can't really understand how can Adobe let the developers release such a messy embedded Flash editor. Please, fix the line copying, it drives me mad. In every normal editor, when u get to the start of the line and press shift+downarrow, the whole line is selected. Flash selects the tabs in the next line also. So pasting is a horrible nightmare.

View 1 Replies

ActionScript 3.0 :: Tabs Do Not Move Beyond First Attempt

Feb 28, 2012

I have five tabs (moviclips). On the first interactio it moves to the appropriate tab but it does not work afterwards. The following is the code:
 
stop();
taba.addEventListener(MouseEvent.CLICK, gotaba);
tabb.addEventListener(MouseEvent.CLICK, gotabb);
tabc.addEventListener(MouseEvent.CLICK, gotabc);

[Code].....

View 6 Replies

Actionscript 3 :: Find Out The X And Y Coordinates Of Each The Tabs

Sep 3, 2009

In a tab navigator, I need to find out the x and y coordinates of each the tabs. Is there a way to do that? I am using HBox as Tab in the TabNavigator.

View 1 Replies

Actionscript 3 :: Different Width For Different Tabs In Tab Navigator

Feb 11, 2010

Is there some way to have a tab navigator in flex where each tab width can be controlled explicitly ?

View 1 Replies

Flex :: Have Different Colors For Different Tabs In SuperTabNavigator

Apr 2, 2010

Well the heading is basically what my question is:

How can I have different colors for different tabs in SuperTabNavigator.

Below is the code to my SuperTabNavigator with three tabs:

<containers:SuperTabNavigator x="0"
y="10"
width="100%"

[Code].....

I want to have different color for every different tab.

How should I do this.

I know there is a firstTabStyleName and lastTabStyleName: is there any way to have the secondTab or the middleTab

View 2 Replies

Flex :: Sort The Tabs As Each New Tab Is Loaded?

Feb 13, 2011

Im loading tabs for an accordion control at runtime. The number of tabs is determined by the role of the user. Each tab comes from a module so the load time is variable. As a result the list order changes every time the app is run.Is there a practical way to sort the tabs as each new tab is loaded?

View 1 Replies

AS3 :: Preserve Tabs When Saving XML In FLex4/Air App?

Mar 31, 2011

I'm loading an xml file in AS3/Flex for an AIR app. When I save it, the indenting looks pretty, however all the tabs from the original file, are now spaces. Can I save to that the tabs remain?

open file code:

var file:File = event.target as File;
var fileStream:FileStream = new FileStream();
fileStream.open( file, FileMode.READ );

[code]....

View 1 Replies

Php :: Synchronizing Web Application State Across Tabs?

Sep 21, 2011

I'm trying to maintain a web applications state across multiple tabs whilst using ActionScript, JavaScript, and PHP. Should I use AJAX to update the database after an item has been purchased etc, or should I prevent the game being loaded if it's already open in a single tab (if so how could I achieve this)?

I'm building a facebook game, when the user buys an item and has many open tabs it doesn't update the state in the other open tabs. The buying of an item is handled by ActionScript, and the storage of that item is dealt with using PHP.

View 1 Replies

Flex4 - Vertical Tabs In Flex 4?

Oct 21, 2011

I would like to have vertical tabs in Flex 4. I have started implementing this by having a vertical list down one side. On list selection I am updating the selection index of a view stack. This gives the functionality of vertical tabs.

My problem is the look and feel. How do I get the list to have a similar look and feel to the horizontal tab bar? Is it a case of overriding skins? I have found this post: Flex 4 vertical TabBar

which does implement vertical tabs. My problem with this is that I do not get any text in the tab. I think the problem is that this was originally written for flex 2. I am using flex 4 and am trying to put this component inside a

View 3 Replies

Flex :: Bind An Object Across Other Tabs?

Feb 14, 2012

I am having a table at the backend, so when a query is asked at the frontend for an object, all the tabs in the front end should be populated with the details of the query object. I am able to pick the query object at the back end , but i dont know how to bind that object across all the tabs in flex. I am getting an error type coercion failed, cannot convert X to mx:Array collection

View 1 Replies

ActionScript 3.0 :: Text Tabs In Motion?

Nov 20, 2009

I'm building a website like [URL] with the text tabs. Now I'm not sure how to create this on a neat way with actionscript.I found this application which is for purchase, but I would like to create it by myself ofcourse.[URL]

View 1 Replies

ActionScript 2.0 :: Switch Tabs And Windows?

Apr 5, 2010

I am trying to switch windows in a browser from a swf. The window is already open and has been paused as the viewer is taken from swf 1 to another window that plays the swf 2. I would like them to be taken back to swf 1 once swf 2 has finished playing.

View 0 Replies

ActionScript 2.0 :: Create Tabs With SwapDepths()?

Jun 2, 2005

I am having a problem and hope someone can help. I've created two mc's. One called "mcSkinned" and the other called "mcSkeleton". Each of these mc's has an mc inside of it that acts as the tab (so when the tab is clicked, the focus changes for either mcSkinned or mcSkeleton). The names of the tab mc's are:

mcSkeletonTabBackground
mcSkinnedTabBackground

So this means that mcSkeleton has mcSkeletonTabBackground in it and mcSkinned has mcSkinnedTabBackground in it.I've placed each main mc (mcSkinned and mcSkeleton) on the main scene and added the following code to an "Actions" layer on the timeline:

mcSkeleton.mcSkeletonTabBackground.onPress = function():Void {
mcSkeleton.swapDepths(this.mcSkinned);
};
mcSkinned.mcSkinnedTabBackground.onPress = function():Void {
mcSkinned.swapDepths(this.mcSkeleton);
};

Now, I know that I've done something wrong. Because if it worked, I would not be on here begging for help. Can anyone please let me know how I am screwing this up? have two tabs change depths when clicked on their tabs. I do not want these mc's to be draggable on to change z-depths.

View 6 Replies

Flex :: Dynamic Tabs Using ViewStack?

Sep 20, 2008

I'm having problems creating dynamic tabs here's my code:

mxml:

<s:TabBar x="1" y="1" height="32" width="100%" dataProvider="{tabHolder}" chromeColor="#EF8B01"/>
<mx:ViewStack x="2" y="34" id="tabHolder" width="100%" height="214" creationPolicy="all">
<s:NavigatorContent label="Home" width="100%" height="100%">
<mx:Image x="6" y="8" height="181" width="402"/>

[code]....

tab wasn't added, what is wrong?

View 1 Replies

Professional :: FLASH CS4 - Tabs In Text Object?

Apr 6, 2010

Just learning Flash CS4 and I can't believe you can't create or set tabs in a text object.You can set tabs for editing actionscript, but not in a text object. Are you kidding me? Even wordpad can do this.

View 5 Replies

ActionScript 1/2 :: XML / CSS - Tabs And Unwanted Line Breaks

May 4, 2011

I have a site that compiles to Actionscript 2.0 and Flash player 8. This site utilises XML output from ASP.Net driven database pages. The problem I have is basically that where I have some tabstops set, in certain cases, where the text starting from the first tab stop is over a certain length an unwanted line break is output just before the last word in the entry. (I know it's always the last word since if I put another word on the end of the string the word that was originally on the new line is back in it's proper place - so it doesn't appear to be length related).

Effectively, what I want is as follows:
header1: Descriptive text header 1
header2: Description header 2
header3: Description header 3
header4: header 4 text
Descriptive text here across multiple lines

What I'm getting is something like this:
header1: Descriptive text header 1
header2: Description header 2
header3: Description header 3 with a long
description header4: header 4 text
Descriptive text here across multiple lines

The Xml I am loading is as follows (This has been anonymiezd and the angle brackets changed to '[]')
[?xml version="1.0" encoding="utf-8"?]
[config scrollPosition="right" styleSheet=".stylesheetscv.css"]
[text][textformat tabstops = "50,540,590"]:[tab /]T[tab /]T[tab /]T[tab /]:[br /]
[list_by]CV Entries By Date[/list_by]
[Code] .....

There are appropriate closing tags further down the file. The CSS that relates to this is:
headertext {
display: inline;
color: #008000;
} itemheader {
display: inline;
[Code] .....

In order to get the CSS to overide the settings of the dynamic text field I use an empty TextFormat object tFormat. The XML is loaded with ignoreWhite set to true. Or can I not see the wood for the trees?

View 5 Replies

Flex :: Get Information Of Tabs Open In TabNavigator

Jun 19, 2009

i am opening tabs with click event on tree list view. Problem is that i do not want open tab Pista as u can see in image again. i want to focus that open Pista tab.

View 1 Replies







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