Yet another project at work required for me to put up an advert for intranet to show quote of the employees about a particular event. Now the challenge was that I had to use the advert that was already casting on intranet which was telling people about the event. Fortunately I had the advert layout with plenty on white space. So all I had to do was find the AS that feeds the quote to my desired placement :-).
This time around I used kirupa, I came across this site long time but never really got around using anything that suits my need.

So the goal is to show quote in a flash add:

ranQuote = new LoadVars();
ranQuote.onLoad = function(success) {
if (success) {
RanNum = Math.ceil(Math.random()*5);
ran = this[”quote”+RanNum];
quote_txt.text = ran;
}
else {
quote_txt.text = “The text failed to load due to an error”;
}
}
ranQuote.load(”Quotes.txt”);

The original code can be found here. Basically you have to have three layers if you are using the button to generate the quote rather than the page load. Otherwise you should be good with two.