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


Similar Posts:


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

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

Flex :: Sending POST Variables To A Browser Window From AIR Application

Jul 15, 2011

I'm building an AIR application. Basically, what I'm looking to do is using navigateToUrl() to open a browser window, assign it a "name" and then, send variables to that newly opened window using the POST method.

EDIT : I need the window to be visible, this is why I absolutely need to use the navigateToUrl() function

I already know that I CAN'T DO something like this, that the AIR application will send the variables using the GET method...

var vars:URLVariables = new URLVariables();
vars.myVar = "Hello my friend";
var req:URLRequest = new URLRequest("http://example.com/my-page.php");
req.method = "POST":

[Code].....

View 1 Replies

Javascript :: Sending An Email From The Browser With Javascript And Flash?

Aug 5, 2011

I'm wondering if its possible to do what I'm thinking, and if it is possible, does anyone know of a flash object that does what I need? I know a Flash object can provide a javascript API to interact with it, what I dont know is can Flash send an email directly without the need to talk to the webserver to do so? If thats possible would it not be possible to write a flash object that did nothing but provide an API to send emails? Has such a thing been created that is out there for others to use?

I'm looking to create a email form on a web page but the site is static (no server scripting). In my situation server scripting is not possible as there is no server, the site is 100% client side on a CD/DVD/USB Stick.

View 4 Replies

Javascript :: IE Onbeforeunload Not Firing ExtenralInterface Callback

Feb 12, 2010

I have a Flash movie embeded with swfobject in a html container. Through ExternalInterface I have registered a javascript function to fire callback to my flash app.

ExternalInterface.addCallback("notifyClose", notifyOnClose );

The javascript function is added as an event listerner to fire onbeforeunload.

<script language="JavaScript">
function getSWF(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1){

[Code].....

I have tested in FF and IE. Firefox works as expected but not in IE. In IE I get notified in Flash with the onload message, but not onbeforeunload.

View 1 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

ActionScript 3.0 :: Toggle_window - Window Opens And Closes Not By Clicking On The Button But On The Window Itself?

Jun 12, 2009

i would like that my window opens and closes (opens: scale out; closes: scale in) not by clicking on the button but on the window itself.here are 3 applications of mine (schuifwindow, scroll and fotoalbum).
 
Grtz,Jan the man
 
here are 3 applications of mine (schuifwindow, scroll and fotoalbum).
schuifwindow www.truevision.be/other/btn_home.flascroll www.truevision.be/other/scroll.flafotoalbum www.truevision.be/other/foto_album.fla only picture one (left up corner) has a X button (i dont want to use this button)

View 5 Replies

ActionScript 3.0 :: Sending Data From JavaScript To Flash

Jan 14, 2010

I've got a piece of JavaScript code in an HTML file which detects the height and width of the browser. What I'd like to do is pass the height and width values to Flash. I've followed the Adobe documentation for this using the ExternalInterface class but can't get it to work. For some reason the sendDataToFlash(); function in my JS isn't being called. Here's my code (NB. I'm only trying to pass the height value at the moment as a test):

HTML file with JS:
<script src="Scripts/swfobject_modified.js" type="text/javascript">
</script><script type="text/javascript">
var myWidth = 0, myHeight = 0;
function getDimensions() {
if( typeof( window.innerWidth
[Code] .....

View 3 Replies

ActionScript 2.0 :: Data Sending Opens A New Browser?

Oct 8, 2010

I am using this code to send to database however i want the url to submit to the same page. At the moment it opens up a new window

Code:
on(release) {
data_lv = new LoadVars(userScore);
data_lv.score = "100";
data_lv.send("modeight.php?score="+data_lv.score+"", "POST", "_self");

View 3 Replies

IDE :: Flash Form - Sending Data Without Opening Browser

Dec 14, 2009

I have a flash form with input text fields. I am sending the data to a 3rd party server. I can send the information via getURL but I want to send the data without opening a browser window so I am utilizing sendAndLoad. It works great locally but not through a browser (tested in IE and Firefox). I have verified that all the variables and urls are in the correct case, I have tried both Post and Get, I have tried network and local..

Here is the file - click on the second image...[URL]
Here is the code...
on (release) {
if (first_name.text.length == 0) {
error.text = "** First Name Required **";
} else if (last_name.text.length == 0) {
error.text = "** Last Name Required **";
[Code] .....

View 1 Replies

Javascript :: Check Whether A Browser Window/tab Is Focused?

Aug 1, 2011

It is a small widget. It lives in an iframe, and because of this, this method is not working. And since the iframe is loaded from a different domain there is no way to reach the top level window object.

[URL]

"With the recent new 10.3 player this should be much easier, since there are new events for this specific situation."

So, using a simple flash object, and maybe js callbacks this might be the solution, but what are theese events?

View 2 Replies

ActionScript 2.0 :: Resizing Browser Window On GetURL - Not Using JavaScript

Sep 20, 2010

I'm working on a kind of coverflow layout and I'm using an XML file to house my links and information about those links. in my ActionScript, I'm using getURL to point to the link the user clicks and open the link in a new window using the following script:

getURL(infostruc[current - 1].artLink, "_blank");

I need to have the new window open up to a specific size (1014x714), but I'm not sure how to write the AS for this kind of action since I'm calling the link from an external file.

View 1 Replies

Javascript :: Update Client Status To Server On "onbeforeunload" Event?

Sep 2, 2010

I have a flash application that needs to send a http request to the server which will disconnect the existing session immediately. I have a tried a few options but none is reliable.Option #1: On "onbeforeunload" event send a http request from inside the flash applications. Fallacy: This does not work because as soon as the browser is closed the flash player unloads the app and hence the communication breaks.Option #2: On "onbeforeunload" event send a http request using XMLHTTPRequest in ajax. This works fine in IE but doesnt work in Firefox. When i debugged the http req in httpfox it threw "NS_BINDING_ABORTED" error which i think means that request was cancelled due to page unload.

View 2 Replies

Javascript :: Flash - Scrollbar Based On Browser Window Size?

Feb 24, 2010

I have a Flash file embedded into HTML - the objects inside are place based on the browser's screen size.Most of the time I don't want a scroll bar, as things are correctly placed, but once the browser window gets too small it'd be nice to have it.So, the main question: can I have a Javascript code listening for the browser window, then adding a scroll bar if it's smaller than a certain number?

View 1 Replies

Javascript :: Open Browser Window Using ExternalInterface Then Write HTML In It

Nov 6, 2010

I can open a new window using window.open() in ExternalInterface.call() but then I want to be able to write contents to the new window. Since, I cannot get the reference of the window back from window.open() call, I am not able to do anything to the window once it is opened.

I do not have any control over the HTML in which my swf is displayed.

Has anyone been in this situation before?

Update: After a few hours of trial and error I found you can get out of this situation by storing your window reference globally and referring to the same global reference whenever you need to access the new window.

View 2 Replies

Javascript :: Flash Games Don't Resize Properly In A Browser Window?

Apr 24, 2011

Most flash-based browser games don't seem to resize properly when the user resizes their browser window (i.e. ctrl+mousewheel). Example of bad resizing: Boxhead The Zombie Wars. Please refrain from playing for a moment, lest you forget about my question.

Some (surprisingly very few) actually do resize properly. Example (at least in Chrome): D.N.8

Is there a simple or standard technique to accomplish proper resizing? How do you do it?

View 1 Replies

Javascript :: Preserve Browser Window Focus When Clicking On Plugin?

Sep 7, 2011

I have a web page that uses javascript counters to count user "active" time, meaning the time a user spends viewing this page (and not some other page). I do this by starting/stopping them using the [URL].. However, when the user clicks on a plugin inside the same page (flash, java, etc), the window loses focus and window.onblur is fired. Is there a way to tell that the user is still on my page?

View 1 Replies

Javascript :: Make A Flash File Fit The Entire Browser Window?

Dec 17, 2011

I'm using Adobe Flash CS4I'm currently trying to fit a flash intro inside the browser window (height 100%, width 100%). I've tried changing the height, width attributes but with no luck. What am I doing wrong?

View 1 Replies

Actionscript 3 - Flex / Flash - Open The Swf In A Browser Window That Doesn't Have The Browser Control Bar Or Menu?

Oct 27, 2010

The title essentially is the question, how do I open the .swf without the browser's control bar junk? and maximize the window?

View 2 Replies

Javascript :: Flash - Automatically Maximize Browser Window And Switch To Full Screen Mode?

Jan 23, 2010

I am working on a Flash app that is 900x700 pixels. When viewed in misc. browsers at 1024x768, the browser chrome causes robs too much of the vertical space and the app appears in a window with a vertical scrollbar. Unacceptable.

The flash app will be launched via a link emailed to the viewers.

I'd like to avoid resizing the flash app and am wondering if there's a way to do the following via javascript, with no clicks involved:maximize the current browser window remove current window address bar and tabs / switch browser to full screen view (equivalent to pressing F11).

An alternative would be to resize the flash app vertically to match the browser canvas height to avoid scrolling. This may cause the app to become unreadable, so not the best approach in my case.

UPDATE: Seems that browser resizing and autoswitch to full screen won't work and neither will the flash app auto resize. What is the best approach then? And, some users may have browsers with toolbars or open a small browser window.

The only idea I have is to use javascript and display a message to users with small browser windows to pres F11 manually. The audience is executes and some may not even know what an F11 means...

View 5 Replies

ActionScript 3.0 :: Find In Closes Window?

Jul 8, 2011

When I have the AS open and try to find a label, the AS window closes and it goes back to the Flash cs5 timeline without executing a find. In order to find anything I have to copy the AS and put it in another text document outside of Flash. What am I doing wrong?

View 3 Replies

Open Separate Browser Window And Pass Data?

Feb 22, 2010

I want to display some data in a separate browser window instead of using popupManager. How do i do that. Also i need to pass parameter to that window, based on that parameter, i ll call the service and get the required data and display that in the datagrid.

View 1 Replies

ActionScript 3.0 :: Expands And Closes Flash Window?

Jun 2, 2010

You've seen a web site were the flash expands with an option to close. Doe's anybody know where I can learn that script?

View 1 Replies

Javascript :: Pasting Non-text Data Into Browser-based Apps?

Jun 11, 2010

Imagine I want a user to be able to copy-paste a selection of pixels from MSPaint into a browser-based app. Is this possible using JavaScript in any current browsers? Will it become possible in HTML5?If not, is it feasible using something like Flex/Silverlight, or is it simply not possible at this time, and you'd have to save a file and manually upload it?

update: sounds like HTML5 should allow it, but that's a way in the future to be genuinely useful. Some suggestions of Java applets and Flash are mentioned, probably Flash would be preferable since parts of the web-client would probably use Flex anyway... I'd rather not have requirement for Java and Flash in my site.

View 1 Replies

Flex :: Make A Flash Browser App That Could Receive Data From Browser Plugin Or Other Windows App?

Dec 18, 2009

in other words, suppose I want to send data, like text, programmatically from a Windows app (such as a browser plugin) to a Flash app running in the browser. Well, conceptually, an example of this might be a Flash instant messenger with a textbox and button "Send"; so let's say I want to be able to programmatically paste the text and press Send or otherwise activate it. That's NOT what I am trying to do here in reality (i.e., no,I am not trying to spam other people's chat rooms or anything)but just an illustration of a similar situation.I can include in it whatever widget or hack that may be necessary.The reason why this problem is arising for me is that AFAIK the SDK that is providing me the data I want cannot be directly accessed from Flash, so I need a way to pipe the data from a regular app into Flash. can I have the Flash app interact with other apps through localhost IP? Or are there draconian restrictions on which server Flash in browser can and cannot interact?

View 1 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

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

Flex :: Use Data From The Main Window In A Sub-window?

Jun 30, 2011

I've just started working on a photo viewer type desktop AIR app with Flex. From the main window I can launch sub-windows, but in these sub-windows I can't seem to access the data I collected in the main window.

How can I access this data? Or, how can I send this data to the sub-window on creation? It doesn't need to be dynamically linked.

myMain.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[Code]....

I realize this might be a very easy question but I have searched the web, read and watched tutorials on random AIR subjects for a few days and couldn't find it. The risk of looking like a fool is worth it now, I want to get on with my first app!

View 1 Replies







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