[Flashr] FlashrResponse / simpleSearch example

Kelvin Luck kelvin at kelvinluck.com
Tue May 16 04:16:08 EDT 2006


Hi,

I'm not exactly clear what you are trying to do... I think that what you 
may want to do is in onAllPhotosLoaded (presuming you want to wait until 
all the information is loaded) you could call a function on the _parent 
timeline (or even _root), passing all the information you had collected. 
e.g.

function onAllPhotosLoaded()
{
	_parent.doPhotosLoaded(_photos);
}

Then on the parent timeline you would be able to loop over all the 
photos in the array as I did in the example...

A better method would be to use EventDispatcher to dispatch an event 
when the data was loaded. That way as many listeners as you wanted could 
subscribe to the event and do something based on it... However, this is 
a bit more complex and you will have to google around a bit to figure 
out how to do it...

Hope that helps,

Kelvin :)

Koji Wakayama wrote:
> hey everybody,
> I tried to play a little bit with kelvins simple search example.
> It works great. my problem is that I don't know  how to use the 
> FlashrResponse in the main fla.
> I made a variable called _infoText  in the class which contains every 
> information that is given by the FlashrResponse
> (like the trace in the example). now I'd like to read out the variable 
> in my main fla every time, when the FlashrResponse get new data.
> until now I only can read out the variable like this:
> 
> public function getInfoText():String
>             {
>                         return this._infoText;
>             }
> 
> thanks,
> koji


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.6/339 - Release Date: 14/05/2006




More information about the Flashr mailing list