  | |  | reducing variables passed by getURL | reducing variables passed by getURL 2004-03-11 - By Cortlandt Winters
Back Hi Matthew,
This is pretty old and I barely remember anything about it other than that it was a good way of keeping the http packets clean in F5. If you're not restricted by the player, I would suggest thinking about using loadVars instead of getURL, but if you are limited to F5 the idea is pretty simple. In this case there was a DummyDataLoader Clip on the stage that could be duplicated and thus would have a clean scope. Then you put variables in it and call loadVariables from it. Seems pretty lame at this point, but it worked with F5 and kept the http from geting cluttered. loadVars is really better if you can use the 6 or 7 player.
This used get with loadVariables. The DummyDataLoader was a clip on the timeline
// this function sends the login screen information to the server function sendLoginInfo(username, accesscode, server, servlet){ var loginCommand; duplicateMovieClip ( DummyDataLoader, "DDLNew", 10 ); if (connect_mode == "relative") { loginCommand = "debug/bio.dat"; DDLNew.loadVariables(loginCommand); } else { loginCommand = servlet; if (connect_mode == "projector") { loginCommand = server + loginCommand; } DDLNew.command = "inst-login"; DDLNew.username = username; DDLNew.accesscode = accesscode; DDLNew.loadVariables(loginCommand,"GET"); } CurrentDummyDataLoader = DDLNew; }
The dummyDataLoader would have some code to call the parent when the data was loaded. onClipEvent (data) { _parent.BioInformationLoaded(); }
FWIF
Cort
-- --Original Message-- -- From: Matthew Horn [mailto:mhorn@(protected)] Sent: Thursday, March 11, 2004 12:14 PM To: flashcoders@(protected) Subject: [Flashcoders] reducing variables passed by getURL
>From my understanding, getURL passes all the variables available to the root scope when it's called.
This is a bit of a headache since I have lots of them and don't want to send unnecessary packets (POST method) or make an unnecessarily ugly URL (GET method).
Is there a way to instruct getURL() to only used "opted in" variables? There are 3 known variables that I want sent, and the rest can just go to hell, for all I care.
Tnks for any help. :)
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106660 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |