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


Similar Posts:


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

ActionScript 3.0 :: Detecting Browser Close Event And Send Data To Database / When User Closes Browser Window

May 24, 2010

Trying to detect a browser close event and send some data to the database when the user closes the browser window...but can't seem to get it to work.[code]

View 6 Replies

ActionScript 2.0 :: Run A Script When The User Closes The Swf?

Jul 11, 2009

Can you call a function when the user closes the browser window or navigates away from the page? I'm making a cartoon, and I'm curious how long people watch it before closing the window or navigating away from the page. I could have it, every x seconds, report back the the server, and I can get a rough idea of how long they watched, but if it could report the exact time when the user closed it, I would know exactly.

View 3 Replies

ActionScript 3.0 :: Call A Function When User Closes Your Swf

Jul 3, 2010

how do you call to a function when the user closes your swf?

View 2 Replies

Php :: Possible To Run A Function When Someone Closes A Browser Window?

Jan 27, 2011

For example, Lets say I have a flash swf game, and when users press connect they are assigned a random id that's then put into a mysql table. Then I have other users that connect and then can connect to these random ids. When users click disconnect i have the id taken out of the table that way when other people want to connect they dont get ids that arent active. is it possible that when a window is closed to have it run a php script? so i can get it to clear their user id?

View 2 Replies

ActionScript 2.0 :: Pausing A Flash Movie When User Tabs Away?

Jun 12, 2009

im creating a presentation that has a bunch of links to websites and pdf files. right now the presentation opens fullscreen when first opened but if the user clicks one of the pdf or web links the clip minimizes and if the user tries to maximize the flash window the menu bar at the top is visible and cuts off some of the content.

is it possible to detect when the user tabs away from the presentation so the clip will pause automatically and i can tell the user to click to continue? i know this code will work fscommand ("fullscreen", "true"); that will make the presentation fullscreen again but i need the movie to pause if the user clicks a link. i have seen this before in games where the game will pause if i tab to another program and i have to click to continue.

View 2 Replies

ActionScript 3.0 :: Listening For Focus As User Tabs Using Screen Reader?

Jul 27, 2009

I'm trying to build accessibility into a slideshow that will work in Window Eyes on a PC/IE7. The user will tab in order over a button for each slide. It all works except for I'd like to show the image on the stage when they tab to the button. I thought if I could listen for the tab, I could execute a function to change the image. But that doesn't seem to work. Should I scan for a change in which button is focused on? I'm not sure how to do that..

View 0 Replies

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

Actionscript 3 - Dispatch Flash Event When Person Closes Browser

Oct 28, 2010

I have an RTMP stream loading and would like to know the drop off time of the video. Is there a method of knowing when a person abruptly leaves the video session by closing the window, back button, address bar, etc?Or do i need to make an external interface call from JavaScript to Flash using something like onunload & onbeforeunload events?I am guessing that it is the later, but wanted to see if there was a method of keeping all my code inside of AS3.

View 2 Replies

Flex :: Clear Shared Objects When Browser Closes Abruptly?

Jun 7, 2011

How to clear the shared objects when user closes the browser abruptly?If the user opens the same application in two tabs, and user tries to close any one of the tab, we have to listen only the closed tab event.

View 1 Replies

Html :: Swf Adaptative Resolution, Change Depending User's Monitor?

Aug 22, 2011

Is it posible to make a flash site, which will change the size when the vistors resolution is diferent? Practicly, every visitor will see the same size of the site, even if he has 800x600 or 1280x1024??Maybe making html go fullscreen but make the swf occupy only 80% of the screen, so it always have the same proportion to the users monitors.Do you have any example?

<center>
<table border="0">
<tr>

[code].....

View 1 Replies

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

Javascript :: Sending Flex Data To SQL As The Browser Closes (on Window.onbeforeunload)?

Nov 3, 2011

I have a ColdFusion function which sends analytics called from a Flex sendPageAnalytics() function to a SQL database when the user navigates - this works perfectly.What I am trying to do is have the Flex application send a bunch of analytics when the user closes their browser, therefore providing information about the last navigation.

I have used an ExternalInterface callback and listener for window.onbeforeunload and a trace statement tells me that this is working fine.My problem is that when all bundled together, I get as far as tracing out that the sendPageAnalytics() function has been called, but I do not get a sendPageAnalyticsFaultHandler() trace or a sendPageAnalyticsResultHandler() trace, which I do on every other sendPageAnalytics() call.

View 1 Replies

Javascript :: Flash - Monitor Browser Windows From The Same Domain?

Jun 23, 2009

My webpage loads a background flash which will connect to the server using socket. If a user open multiple windows/tabs of my website, the server will get multiple socket connections. Any idea of how to make sure that only one socket is connected from the same user and same browser?

I am thinking of using Javascript to monitor the window close event, if a window that was connected to the server is closed, one of the other windows will try to connect to the server. But I can't find a way to listen to that event.I was thinking of Flash's LocalConnection too, but can't find a way to assign unique connection names and let other Flashes know.

View 3 Replies

Actionscript 3 :: LocalConnection Working In Local Browser But NOT In Remote Site

Jan 23, 2010

Really puzzled by the flaky behavior of LocalConnection. Using a debug utility(LuminicBox) that uses localConnection to work.

When the page containing the swf is loaded in a browser locally , localConnection works.

When the identical page and swf are viewed 'live' on a remote site, localConnection fails.

View 3 Replies

Actionscript 3 :: Does The Value Of Stage.stageWidth Change As Per The Screen-resolution, Monitor-size, Browser Etc

Mar 12, 2012

Does the value of Stage.stageWidth or Stage.stageHeight change as per the screen-resolution, monitor-size, browser etc ?

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

Flash :: LocalConnection Between Swf Sending Delay & LocalConnection Sniffer Tool

May 6, 2011

The first one (FLEX application) sends a message on a dedicated LocalConnection to a second one (Flash application). The Flash then answers by sending a message on another dedicated LocalConnection. This message is not directly received by the FLEX and the delay is at least 30s, up to 1 or 2 minutes! It seems the issue only occurs with Flash Player >= 10 and it never occurs with Chrome.

I didn't find anything on the web concerning a similar issue nor something in Flash Player release notes. Did someone already have this kind of problem?

By the way, is there any tool that can be used to sniffer LocalConnection communications?

Additional information:

swf are located in different frames swf are embed with swfobject I tried to delay the Flash sending, I tried to create another LocalConnection dedicated to this call but I always had same result: for all calls, the FLEX method is called after the same delay. I also put a timer in FLEX to periodically log to see if there is no background process delaying the method processing but everything seems fine

View 1 Replies

IDE :: Getting The Browser 'empty Cache' Without The User Having To

Jan 31, 2010

I have been updating my flash pages, and so many people cant see the changes, because they have to reset their cache in the browser .. which is fine for any savvy internet user .. but there's a lot o folks out there who dont recognise this action .. are there any tips to talk to the browser that changes have been made?

View 1 Replies

Php - Restrict File Types For A User In A Web Browser?

Nov 29, 2010

i have a question that is almost like other questions but with a small but very important difference. how can i restrict file types for user with a popup showed in the browser.

The standard file input of html can limit that with a command but it does not work in all browser so it is not an option. I do not want to validate the file extension after the user has chosen a file but before that, when he is choosing.[URL].. but it uploads the file after the user has chosen it, i do not want to do that, i want to upload it after the user submits the form.

So the problem looks like this that there are some ways of not letting the user send a not valid file but they are not good because, one is that i validate after the user have chosen the file and the other is that i upload the file before the user submits the form.

I just want a simple thing to not letting to "chose" a not valid file, it does not matter if it will be made with java script or flash, just let it work.

View 5 Replies

Actionscript 3 :: What Is The Sense Of Flex Modules

Jul 20, 2011

As far as my understanding goes Modules kann be used to split an Application into different parts. A big advantage seems to be to be able to load Module after Application Start, to get a better Startup performance. I personally would like Modules to make me able to have an own Code Sandbox for the Module Code. So neither the Main App Code nor the Module Code should influence each other. But for examples CSS Styles from modules influence the Main Application an visa vers. My Question:

1. What can I use Modules for beside Runtimeloading ?

2. Are there options to run code in an own sandbox ? For Example via Loading swf assets ?

View 2 Replies

Flash UI Component Not Being 'repainted' When User Uses Browser Zoom (only On Mac/Safari)?

Jul 22, 2010

I have flash component in a website, which shows a preview. There are some UI components overlaid on the preview to allow navigation. Unfortunately it seems that in Safari on Macs, there is a problem:When the user zooms in or out (using the browser based page zoom), my overlaid UI items disappear for some reason. This does not happen on any other platform.I would have though that this zoom function would be something that is taken care of solely by the browser/Flash plugin, however, perhaps there is something I can do to force a 'redraw'?

View 2 Replies

Actionscript 3 :: Know In Flex When The User Has Completed Resizing The Browser Window?

Sep 19, 2010

I need to do some updates to components after a user has resized the browser window. Is there a good solution to determine when a user has completed resizing? I wasn't able to find any flex events that would cover this case.

View 1 Replies

Actionscript 3 :: Possible For It To Play User's Local Video Files In A Web Browser?

Nov 23, 2010

Or only possible to play it loading over the internet?

View 1 Replies

ActionScript 2.0 :: Making Flash To Remember User (In Browser Cache)

Nov 16, 2009

I would like a Flash application to remember the settings that a user on a specific machine or specific browser has earlier set. This is possible, right? What's the most neat way of doing this? Using some kind of a flash cache?

View 3 Replies

ActionScript 2.0 :: Detecting Through Flash Browser Version On User's Computer?

Aug 9, 2004

Is it possible to detect, through flash, browser version on a user�s computer?

View 1 Replies

ActionScript 1/2 :: Text Output Makes NO Sense

Jun 10, 2009

here's my code (I'll explain in a second):

[Code]....

Code: - CA:true - TC:0 - CA:true - 1 - TC:1There's no logic in that! The output proves that both parts of the array are true. And yet, the "if" statement only activates once!

View 8 Replies

Flex :: Video Or VideoDisplay When Does It Make Sense To Use One Or The Other

Nov 19, 2009

Flex appears to have 2 video classes: Video and VideoDisplay. My question is when does it make sense to use one or the other?

What I can tell from initial glancing is that VideoDisplay responds to mouse events because it inherits from IntaractiveObject, but I'm not sure if it's a real difference, because Video seems to have a workaround for this in that you can add your own event listeners.

There's probably more to it, but this is the only difference I can see now. So my question for those who used these objects extensively, can you share your experience when you use one over the other.

View 1 Replies

ActionScript 3.0 :: HTC Sense Homescreen Slider 'alike'

Oct 19, 2010

I'm looking for a way to make a simplified version of the HTC Sense Homescreen slider. I had something like this in mind: [code]I basically need to make 8 homescreens. Each homescreen is an interaktive movieclip. Nothing fancy is going to happen inside those movieclips.No navigation buttons, just a plain and simple drag and slide with movieclips.I have a bit knowledge using greensock tweens also - so if you got a solution with this please share your knowledge.

View 1 Replies







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