Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
close mystery

close mystery

2004-02-25       - By Simon Lord

 Back
Reply:     1     2  

I just spent the better part of the day trying to figure out how to
send one last message to my DB when the user exits.  For some reason
I'm getting mixed results.

Here's the close() code as supplied by most components in FCS authored
by MM:

// :::::::::::::::::::::::::::::::::::::::::::::::
FCPeopleListClass.prototype.close = function() {
  var fullName = "FCPeopleList."+this.name;
  // Let our server side counterpart know that we are going away
  _root.exitROOM();
  this.nc.call(this.prefix+"close", null);
  //
  this.so.owner = null;
  delete this.so.owner;
  delete this.so.onSync;
  this.so.close();
  this.so = null;
  //
  this.nc.FCPeopleList[this.name] = null;
  this.nc = null;
};
// :::::::::::::::::::::::::::::::::::::::::::::::

... I added _root.exitROOM(); which is simply the following which DOES
NOT WORK:

// :::::::::::::::::::::::::::::::::::::::::::::::
function exitROOM() {
  var sql = new LoadVars();
  sql.load("flashindex.php?op=exit&room="+this.appInstance, "", "POST");
}
// :::::::::::::::::::::::::::::::::::::::::::::::

... curiously enough, this does work (but it gets run when I ENTER the
room which I can't figure out why entering the room triggers close()):

// :::::::::::::::::::::::::::::::::::::::::::::::
function exitROOM() {
  getURL("flashindex.php?op=exit&room="+this.appInstance);
}
// :::::::::::::::::::::::::::::::::::::::::::::::

... but I DON'T want to load this page.  Anyone know why it won't work
properly?  Better yet, is there a more foolproof way to determine the
browser page containing the flash file has been closed and to load
flashindex.php one last time?

Sincerely,
Simon


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington  
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: flashcomm-unsubscribe@(protected)
For additional commands, e-mail: flashcomm-help@(protected)