*goes to read up on Delegate*

Thank you. :)

-[a]-


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of T. Michael
Keesey
Sent: February 14, 2007 9:20 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Problem with cascading functions within a class

Delegate!

import mx.utils.Delegate;
// ...
public function grabHTML():Void {
    var html_data:LoadVars = new LoadVars();
    html_data.onData = Delegate.create(this, doSomething);
    html_data.load("http://somesite.ca/some.html";);
}


On 2/14/07, Andrew Murphy <[EMAIL PROTECTED]> wrote:
> I'm programming a class which includes something like following methods:
>
>
>
>
>
>
>
> // grab some .html
>
> public function grabHTML():Void {
>
>             // loads the .html
>
>             var html_data:LoadVars = new LoadVars();
>
>             // once the .html is loaded…
>
>             html_data.onData = function():Void {
>
>                         // …run "doSomething()"
>
>                         doSomething();
>
>             };
>
>             html_data.load("http://somesite.ca/some.html";);
>
> };
>
>
>
> // does something after the .html has been loaded
>
> public function doSomething():Void {
>
>             trace("doing something");
>
> };
>
>
>
>
>
>
>
>
>
>
>
> Unfortunately the second function "doSomething" never happens.  Can anyone
> clue me in as to what I'm doing wrong..?
>
>
>
> Thank you. :)
>
>
>
> -[a]-
>
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.441 / Virus Database: 268.17.39/686 - Release Date:
14/02/2007
> 7:54 AM
>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>


-- 
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
--
The Dinosauricon: http://dino.lm.com
Parry & Carney: http://parryandcarney.com
ISPN Forum: http://www.phylonames.org/forum/

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.39/686 - Release Date: 14/02/2007
7:54 AM
 
  

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.39/686 - Release Date: 14/02/2007
7:54 AM
 

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to