I've just managed to hack this code to allow searching and results from within Flash. External pages open when you view the whois report, go to the ordering page or visit the queried domain's website.
I've lost some functionality as I only wanted to search for 7 domain types. Other than building the query from Flash, the main changes were made under 'Edit Templates' within the admin section. Namely:
Available Domains
Unavailable Domains
BuyMode Results Page
Whois Report Page
The trickiest thing was pushing the string variable ampersands in and out of Flash, but I got around this using URL Encoded %26 (percent twenty six) in the end.
My Flash text files are dynamic, multiline, html enabled text fields - one with its variable name as 'dom_free' for available domains and one called 'dom_gone' for unavailable ones.
I also has to incorporate the old 'done=0" and "done=1" to tell Flash when the results had been loaded. This was also coded into the template sections.
IMPORTANT! - I've only checked this with FLASH 8 Pro and MX with Actionscript version 2. - it shouldn't be too difficult to adapt this - I did try but my checkboxes went missing :/
Basically it works like this:
Buy Mode should be enabled.
On your stage you have an input text field, in this case, with an instance name of 'dominput'.
You also have some checkboxes with each one's label as a domain extension (without the first dot - com, info, co.uk for example). The instance names of the checkboxes are suff0, suff1, suff2 etc.
You also have a submit button.
You then have 2 dynamic, multiline, html enabled text fields - one with a variable name dom_gone, one with a variable name dom_free.
Finally, you have a dynamic text field with an instance name of doneloading and a variable name of done.
/////
The following code goes in your root timeline and checks for the results coming back:
Code:
function domQuery() {
function domcall() {
trace("checking...");
if (_root.doneloading.text != "0" && dom_gone == "working...") {
dom_gone = "";
clearInterval(intervalID);
trace("all available and callback stopped");
}
if (_root.doneloading.text != "0" && dom_free == "working...") {
dom_free = "";
clearInterval(intervalID);
trace("none available and callback stopped");
}
if (_root.doneloading.text != "0") {
clearInterval(intervalID);
trace("some available, some not and callback stopped");
}
}
var intervalID:Number = setInterval(domcall, 200);
}
The button sends a string like this:
Code:
on (release) {
domQuery();
done = 0;
dom_gone = "working...";
dom_free = "working...";
page = "WhoisSearch";
domain = this.dominput.text;
if (this.suff0.selected == true) {
ext0 = this.suff0.label;
} else {
ext0 = "";
}
if (this.suff1.selected == true) {
ext1 = this.suff1.label;
} else {
ext1 = "";
}
if (this.suff2.selected == true) {
ext2 = this.suff2.label;
} else {
ext2 = "";
}
if (this.suff3.selected == true) {
ext3 = this.suff3.label;
} else {
ext3 = "";
}
if (this.suff4.selected == true) {
ext4 = this.suff4.label;
} else {
ext4 = "";
}
if (this.suff5.selected == true) {
ext5 = this.suff5.label;
} else {
ext5 = "";
}
if (this.suff6.selected == true) {
ext6 = this.suff6.label;
} else {
ext6 = "";
}
loadVariables("http://www.yourdomain.com/whois/whois.php?anticache="+random(9999999999), "", "POST");
}
Along with this it is posting the contents of an input field called 'domain' and the results from either a tick box, list or whatever that is choosing which domain extensions to look for - these are named ext0, ext1, ext2 etc.
The anticache setting is simply to generate a new, unique request each time.
Your 'Available Domains' template section should read:
Code:
dom_free=[repeat]<div>[[domain]].[[ext]]<a href='yourorderingpage.php?domain=[[domain]]%26ext=[[ext]]' target='_blank'><font color="#333333"> || </font><font color="#FF6600">Order Now</font><font color="#333333"> || </font></a><br></div>
[/repeat]
Your 'Unavailable Domains' template section should read:
Code:
&dom_gone=[repeat]<div>[[domain]].[[ext]]<a href='http://www.[[domain]].[[ext]]' target='_blank'><font color="#333333"> || </font><font color="#2D83DE">Website</font></a><font color="#333333"> || </font><a href='http://www.yourdomain.com/whois/whois.php?page=WhoisReport%26domain=[[domain]]%26ext=[[ext]]' target='_blank'><font color="#2D83DE">Whois</font><font color="#333333"> || </font></a><br></div>
[/repeat]
Your Buy Mode Results Page section should read:
Code:
done=0&[[availabledomains]]
[[unavailabledomains]]&done=1
!! Make sure you change the references to yourdomain.com and yourorderingpage.php !!
You can download the Flash source files here:
Username = guest
Password = password
Download Link to FLA file
Good Luck.