-
making an all flash site search engine
First of all, is it possible? Is it possible to have a search engine (made in the same movie or not, flash or not) that searchs Flash content from the same movie? Could it be done using PHP and MySQL? And the RESULTS COMING INTO A FLASH MOVIE? If it is possible, are there any tutorials or things like that on it?
Thanks,
Sportzguy933
-
Hi,
flash can hardly search itself, just data from text files. Also, searching content on the server is more efficeient than to downlod it before. So an all flash search would only make sense if all of the text file is actually loaded into flash for display
Musicman
-
Senior Member
Just like musicman kind of said...
if the content of the rest of that site is readable by bots you can have it indexed.
The easies way is to use Google SOAP API: http://www.google.com/apis/index.html
You can have a developper licence, that's limited to 100 requests a day.
I used it here: http://www.unicyclist.org/cont/searc...ectric+ukelele
(just like macromedia.com).
There is a lot of php5 and some php4 scripts out there that you can adapt to have the results being imported into flash using XML.
-
But wouldn't this all be possible by searching a MySQL database, and then sending the results back to Flash? Although, I don't know how exactly to do that, that should be possible using PHP or XML to send and recieve the information, shouldn't it?
-
Hi,
if ll (or most) or the content you want to be searched is available in the database, you dont have a full flash search but just a conventional server driven search - and it is usually the better choice.
BTW there is no need to use xml ... it is just like adding an extra wrapper to a parcel so that the recipient has to unwrap it
Musicman
-
Thanks for the reply....but I don't think I'm being very clear. I have a site with a library of games and anmations, but instead of having to go through pages, I want there to be a search. The problem is, I don't want to have to bring the user to an HTML page (the site is all-flash). So that's why I was wondering if it was possible to store the keywords somewhere.....and when searched, they send back.
-
Hi,
well... you will be using a traditional search on the server, and the easier option is for the server to send back the simple html that displays in a flash textfield (i.e. no tables, a listing would have something like name of game, submitter, and rating on one row, and possibly use color or font size). The other option is to send back a list of items found, e.g.
game1=xxx&submitter1=xxx&rating1=xxx&game2=xxx&sub mitter2=xxx&rating2=xxx
and use that to build a result display from dynamically created text fields
Musicman
-
I guess that's what I'm looking for; I don't need to search the web, I want to search preset content. So, are there any tutorials or something ?
Thanks!
~Sportzguy933
-
I have found something that resembles about what I want. the search engine at:
http://www.advanceflash.com
is exactly what I'm looking for.
-
-
Senior Member
just a code-drop.
I know it most likely wont be usefull for you, but just visitors that use the searchbutton in teh future and are looking for something like this:
PHP Code:
<?php // php5!
$client = new SoapClient("http://api.google.com/GoogleSearch.wsdl",array(
"trace" => 1,
"exceptions" => 0));
// I suppose you might like to put the that wsdl file local.
$params = array(
'key' => 'your-google-dev-key',
'q' => utf8_encode($_GET['q'].' site:yoursite.org'),
'start' => '1',
'maxResults' => '10',
'filter' => 'false',
'restrict' => '',
'safeSearch' => 'false',
'lr' => 'en',
'ie' => '',
'oe' => '');
$r = $client->__call('DoGoogleSearch', $params);
// display the XML for debugging purposes:
// echo "<pre>\n";
// echo "Request :\n".htmlspecialchars($client->__getLastRequest()) ."\n";
// echo "Response:\n".htmlspecialchars($client->__getLastResponse())."\n";
// echo "</pre>";
$resamnt = $r->estimatedTotalResultsCount;
if ($resamnt > 0) {
echo "results: ".$resamnt;
foreach($r->resultElements as $key => $val) {
echo " <br />\n";
echo " <br />\n";
echo ' <a href="', $val->URL, '">', utf8_decode($val->title), '</a>';
echo " <br />\n";
echo str_replace("<br>", "<br />", utf8_decode($val->snippet));
echo " <br />\n";
echo ' <a href="', $val->URL, '">', utf8_decode($val->URL), '</a>';
}
}
else {
echo " <br />\n";
echo " <strong>No results</strong> were found at the Google database<br />\n";
echo " <br />\n";
}
?>
Is there anyone who can give (or point to) an plain and simple example how to do above within Flash's SOAP-client capabilities?
Not that I'm planning on putting my google-dev key in .swf's, but I want to learn SOAP in flash to be able to make a shipping costs (FedEx) calculator for a store that is made in flash.
-
Hi unicycle,
are you sure you can convince fedex or google to put a crossdomain file on their server?
If not, you will have to put the soap client on your server
Musicman
-
Wait...I don't get it! ! Be gentle...I'm new to this stuff (PHP, don't even know XML...). So how did Advanceflash.com do it, and is there some kind of tutorial that I can follow or something?
-
-
bump............................................pl llzzzzzzzzzzz......................
-
-
Official FK nice guy and MOD
Most likely the advanced sites product descriptions have been added to a database.
When you search, you are searching these products.
So:
You input a search name
The search is sent to a script that pulls the data from the database
The data is returned to flash along with a count of the returned items
The count is used for the pagination of pages and the found items text.
The data for each product that is returned is loaded into a seperate movie clip.
The images that are returned for the product search I would imagine are just paths to thumbnail images. These images are loaded into a movie clip that is within the data movieclip.
All the movie clips are loaded into another movie clip that is used as the scroller.
Getting the data form the database is the simple part, the more "advanced " portion is creating a usable and appealing front end for the returned search items.
AdvanceFlash did what I would have done and created an interface that mimicks an html front end. Its not real flashy but it works very well and it is very clean in design.
So you will need:
A database for text data/ and or product descriptions
A script to query the DB and return the data to flash
A generic flash preloader that can be re-used on all returned images that you want to load.
(Actionscript = AS)
(Movieclip = MC)
AS for search box (limit search characters for security reasons)
AS for input/output errors
AS for pagination
AS for preloaders
AS for data MC's
AS for image MC's
AS for scroller MC
AS and MC's for opening data that has been found and clicked on
Script for pulling full data from databse and returning to flash if a user clicks on a returned search item
Hope this helps you out a little bit.
3P
-
Say what? Sorry, didn't catch that....
~Sportzguy933
-
Official FK nice guy and MOD
In a normal html website search, the page text itself can be used as the base for the keywords search. There are different types of searches, but what you are looking for is a searchable database of products.
Just like I ssaid above, you input a search term, it querys the database and returns to flash any items in the database that match the search terms.
3P
-
Hi. I understand what it's doing, but how do I make it? Do you know of any tutorials or examples that I could learn from?
Thanks,
Sportzguy933
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|